Visual Studio Annoyance

2014/12/21 19:42

I tried moving a VS2010 solution from one location to another only to be met with the cryptic message “The project file ” has been renamed or is no longer in the solution” upon trying to Build/Execute/Clean the solution. This Message is far from useful, especially since VS2010 had managed to load all the required projects.

This link gives a slight hint at what the problem is though I was not sure how to fix it based on the answers within. Looking through the project and solution files helped me find out what was wrong. Most of the projects in my solution were dependant on the same 2 projects “utils” and “glew_static”, judging from the .sln file only some of the projects had them listed explicitly as a dependency others did not, this seemed to be the cause of the error, as removing those that did not list them explicitly let me build the project as before.

And the solution to getting them to be listed explicitly as dependencies in the .sln file is this: Step 1. manually create the dependency via [solution]->properties->Project Dependencies, Step 2. (optional) then if you also need them linked as libraries do what you need from [project]->properties->Common Properties->Framework and References

The order is important here! If you do Step 2 first VS2010 automatically created the dependency in Step 1, and for some reason when it is made automatically the dependency won’t appear explicitly in the .sln file.