C.Nic
- add an environment variable called let's say SRC_ROOT. Make it point to whatever location where your sources are.
- unload your project from Visual Studio
- edit the vcproj file using Wordpad
- replace any path pointing to your files with something like $(SRC_ROOT)\myfile.cpp
- save and load the project again
Whenever you relocate your project is enough to give a proper value to the SRC_ROOT environment variable and everything will work fine.
For example, let's say your sources are C:\MyProject\MyClass.cpp and C:\MyProject\MyClass.h
The .vcproj should be edited to look like (just a snapshot):
<File
RelativePath="$(SRC_ROOT)\MyClass.cpp"
>
some more stuff here
</File>
<File
RelativePath="$(SRC_ROOT)\MyClass.h"
>
some more stuff here
</File>
And the SRC_ROOT environment variable should be set to C:\MyProject. If you move everything to let's say c:\new_project_location, you have to change only SRC_ROOT to be "c:\new_project_location"