Search code examples
c++visual-studiovisual-studio-2015project-settings

Visual Studio messes up project settings


I've created an empty C++ project, added main.cpp, and set up build configurations. Particularly, I changed Output Directory and Intermediate Directory. Pushed everything to GitHub, and cloned it to the other computer. Opened solution, checked properties of the project to find out that it is now set back to default. Tried compiling, wrong directories are used. git status on both computers shows nothing. I also checked .vcxproj to find out that changed strings are present in the file.

What could be the cause of this behavior?

Repository: https://github.com/kirdaybov/experiments

My environment:

  • 1st computer: VS Express 2015 update 1.
  • 2nd computer: VS Community 2015 update 3.

Solution

  • This happens to me all the time!

    VS has the nasty habit of not saving project and solution options, even when you configure it to "Save to Compile", or even when you click the "Save" button.

    You must click the "Save All" button. Or to be extra safe, close VS before committing.

    Or could be caused because one of the computers is compiling the "Debug" configuration while the other is compiling the "Release" one. Or one is compiling the "Any CPU" and the other the "x86". Note that the "current configuration" option is not pushed to the repository.