I’m having a bizarre problem with Visual Studio 2008. I wanted to debug one of the libraries that my web application references. Therefore, I decide to add the project containing the library to my solution so that I can debug them together.
The project containing my library sits at c:\webLibs\myproj.vbproj. However, when I try to add the project to my solution, Visual Studio throws the following error: “The project file ‘c:\someOtherFolder\myproj.vbproj’. has been moved, renamed, or is not on your computer.”
As you can see, VS appears to be trying to open a different file than the one I clicked on. I used to have the file in that other location, but not anymore.
I’ve tried restarting VS several times.
What could cause this bizarre behavior? Why would Visual Studio try to open my project from the wrong folder?
I found the problem. I had an errant TFS Source-Control mapping that mapped the project to a non-existent folder on the hard drive.
My web application is in its own workspace. The library that I wanted to reference is in its own workspace where it is mapped to
c:\webLibs\myproj.vbproj. However, in the web application’s workspace, there was an errant mapping toc:\someOtherFolder\myproj.vbproj.I deleted the errant mapping and everything worked fine 🙂
I believe the moral of the story is to check mappings in all workspaces possibly involved when this sort of thing comes up.