Visual Studio properties->debugging won't stick - visual-studio

I had a solution/project that was going just fine until I made changes to locate the source in a different folder.
Everything compiles just fine but when I debug the Command Arguments and Working Directory are not correct. So I used Configuration Properties->Debugging and set them but when I click OK they always go back to the defaults. Even if I use Apply I can see the entries I made change to the defaults.
My only clue is that I restored my folder that contains the .sln and .vcproj files from a backup but I can't come up with an explanation for this behavior.
I'm using Visual Studio Express 2013.
Does anyone have any suggestions?

Related

Visual Studio 2015. Files not added to TFS

I'm using Visual Studio 2015 update 3 with TFS hosted at visualstudio.com.
When I add a C# class file to one of my projects in Visual Studio, it's not automatically added to source control. For other projects in the same solution, C# class files are added automatically, as expected.
When I then add the file, manually, in the project with this problem, I get the following question;
I have to confirm to add the file to source control.
There is a similar question (Visual Studio 2015 new files not being added to source control automatically), associated with a "release" branch, which is not the case here (at least I think so - our TFS-project has never been branched)
We've never configured any .tfignore manually.
This started to happen recently and occurs on all development machines, so it's probably not a client machine issue.
I'm clueless, so any help is highly appreciated.
UPDATE
I've discovered that the problem occurs in projects with names ending with ".Lib"
Projects:
Core (ok)
Core.Lib (files not added automatically)
Communication (Ok)
Communication.Lib (files not added automatically)
I tried to add a test project Test.Lib to my solution. This project was not added to TFS either, but project Test was.
The "lib" extension is the problem. Try renaming the project folder to something else, eg. "CoreLib".
To reproduce this behavior / bug, try the following:
Create a Test directory in a directory controlled by TFS
Create a Test.Lib subdirectory in this directory.
Add a file, test.cs, to Test.Lib. (Test\Test.Lib\test.cs)
In Visual Studio's Source Control Explorer, try adding the new Test directory to source control. You'll see test.cs on the "Excluded items" tab.
The "lib" extension is used by binary files, and these are ignored by Team Explorer by default. I haven't found an official list of filetypes anywhere, but other affected file types are dll, exe, obj and possibly others. You can include these files manually by right-clicking them and selecting "Include".

"The project file was unloaded" when moving VS2010 project to another server

I have moved a Visual Studio 2010 project to another server by copying and pasting the folder contents into another folder on a different server.
My understand was that VS2010 handled this well; when I have done this locally it has never been an issue.
Now I get an error like this:
When I right click and "Reload project", the list of files briefly appears before disappearing again, giving the original error.
Am I doing something wrong?
I experienced the same problem today. Here is what I did and worked for me :
Open the .sln file.
Right click on the project folder and click Reload project.
You will see the projects and folders that you originally had.
You will see .xml publish file . Double click it .. You should be good to go now.
I had this problem today and it took me a while to figure out what was going on.
Your problem is most likely that your solution was originally made with a Visual Studio configuration that contained support for certain project types (such as "Windows Service" or some other exotic project type). The Visual Studio configuration you are using to import your solution does not have that support. In other words,
there is probably nothing wrong with your solution,
there is probably nothing wrong with your project,
there is probably nothing wrong with any of the files (as you mentioned they do display briefly, giving you a second of hope)
Just run the installer on the new Visual Studio and make sure the support is enabled for all the project types you need and try again.
In my case the problem was the .vbproj file had somehow been corrupted so the normal xml code was replaced with a long string of null characters. I noticed this thanks to a file that was generated in the same folder as the project file when I tried to open the project - it was called 'UpgradeLog.htm'. This had an entry saying ' Error on line 1. Expected '<' but found 'null character'.'.. suggests there may have been a recent update to Visual Studio that I hadn't noticed?
Luckily I could use my source control system to revert back to a slightly earlier version - I guess it shows how important it is to have backups!
In my case, I saw similar message (Projected was unloaded) and all I had to do was simply re-launching Visual Studio (2017) in Admin mode and the problem went away. Per one of the above answers, I tried to right-click and selected Reload but got a warning that, due to required access to IIS on the machine, I had to launch VS in Admin mode.
HTH
Found this answer and it worked for me.
Note:Sometimes, the path in File path property is grayed out and you are unable to get to the Browse button. In this case try deleting .suo files. Don’t worry, these files gets recreated when you rebuild the solution / project.
http://www.howtosolutions.net/2013/02/solving-project-file-error-could-not-find-part-of-the-path-with-visual-studio/
I had the same problem. I fix path to .csproj files in the .sln file with a text editor and now it is all ok.
Open Visual Studio as Administrator

Clearcase does not checkout project files when files are moved by resharper

My current project is under source control by clearcase. I am also using Resharper 8.1 with Visual Studio 2012. I am also using a VS integration for ClearCase.
When adding files manually to a project (by right clicking on the Project -> Add-> Class), ClearCase checks out the project file, so that saving all files works like a charm.
"Unfortunatelly", I tend to use a lot of the ReSharper functionallity. When using ReSharpers Move To command, it seems that ClearCase prevents ReSharper (or Visual Studio) to check out the project files. They are modified, but cannot be saved - I always get that Save As dialogue when saving all documents. To get this working, i need to manually check out the *.proj file and then save the modified files. Is there a way to automatically check out those files?
Another problem is when using ReSharpers Rename: I just tried to use Rename on an interface that is used in approx. 60 other files. Everythink worked, except that the files were not checked out by clearcase! In order to save, I needed to Save all, click cancel for the first file (ClearCase then recognizes that the file has been modified and checks it out) and then save again. This is really annoying and prevents from a produtive workflow..

Visual Studio Makefile Project makes extraneous 'obj' folder

I'm using a Makefile project in Visual Studio 2012 express just fine. However, regardless of the Build Command specified, Visual Studio always makes an 'obj' folder containing empty subfolders obj\Win32\Debug and obj\Win32\Release.
To reproduce the problem, simply create a "Visual C++ - General - Makefile Project" and use a DOS command like 'dir' in the Build Command Line. As soon as you build, the empty obj\Win32\Debug folder will show up.
I can simply skip these in my Mercurial ignore file but it'd be nice to find a fix. Anyone know how to make Visual Studio not generate these empty folders?
Found a trick: to set the intermediate output directory on an existing directory. I modified the project file by hand and added this:
<IntermediateOutputPath>$(ProjectDir)</IntermediateOutputPath>
inside the configuration PropertyGroup. I used the project directory, which obviously already exists. No more useless obj directory!
The obj folder represents VS' own metadata about your project for intellisense support and designer support (for WF/WPF apps). For the most part you can ignore the folder completely without issue.
On occasion though this data can become corrupt and cause VS to show invalid Intellisense options and the workflow/WPF designer can cause errors. Closing VS and deleting the obj folder will quickly resolve this though.

Visual Studio and TortoiseHg: folder not visible in VS

I created a C# project and added it to source control (mercurial). I can edit files in VS, commit it and push it using TortoiseHg. It goes to the server. When some one pulls they get the files.
In my visual studio I added a folder and a file inside that folder. I used TortoiseHg and it saw the new file in the new folder. I committed it and pushed it.
However, now someone pulled the latest code from the server - and they got the new file (it is visible through windows explorer), but when they open the solution in VS, they don't see the file.
Does someone have an idea what is wrong here? or things I should check? Thank you for the help.
P.S. I have visual studio 2010 express (so I can't use the VisualHg plugin).
Visual Studio caches changes to the solution and project until an explicit save or a build. In your comment:
In my visual studio I added a folder and a file inside that folder. I used TortoiseHg and it saw the new file in the new folder. I committed it and pushed it.
I see that an updated .sln or .vcproj file was not mentioned and checked in. Did you see an update to either of these files via TortoiseHg? If not, make sure to build or save your project after a change like this.
Did you make sure that the Visual Studio Project File or Solution file is being updated and committed?
VS solution contains projects and each project select managed files by metadata(***.vcproj file). It's not the way include all files from root directory.
So, your co-workers can see new added files by in following two ways.
1) share project file(***.vcproj)
2) manually add files in each person's VS instance.

Resources