This issue is quite hard to explain, so I may need to add more details based on questions you may have.
I'm using TFS and Visual Studio 2013 for dev.
I have the following branches:
Development Branches
- $/ProjectName/Development/Development
- $/ProjectName/Development/201406 June
- $/ProjectName/Development/201407 July
- $/ProjectName/Development/201408 August
I have the following workspace mapping:
$/ -> C:\Projects
When a new month starts, I create a branch in dev, e.g. 201408 August, and set up the following mapping (in addition to the above top level mapping)
$/ProjectName/Development/201408 August -> C:\Projects\ProjectName\Development\Development
This helps me easily change my work spaces and pick which branch I want to use without having to change a LOT of references and things in IIS. That all always point to C:\Projects\ProjectName\Development\Development no matter what branch I work on.
Now once I'm done with my development for the month, I make sure all work is checked in (I always check in AT LEAST once a day). I then remove the work space mapping, so that everything is mapped only by the top level mapping again. I then merge Development/2014 August to Development/Development.
Once I'm happy with any merging I need to do, I check in Development/Development and the job is done.
All this is exactly how I'd like it to work, but there is a snag.
For some reason, VS remembers that the projects resided in Development/201408 August, so when I open the Development/Development solution file, the project points to Development/201408 August.
I then remove the project(s), and add it from the correct location (Development/Development). If you then look at the properties, it's changed it again to Development/201408 August again, DOH!
I found someone with a similar issue, and they said to:
Remove the offending project(s)
Save the solution
Close Visual Studio
Delete the *.suo file next to your solution
Re-open VS
Re-Add the project(s)
Save the solution
And the it would be fixed. This is true, it sorts out the problem, but I'm hoping somebody can tell me why this happens, because I have over 35 projects in my solution, and I sure as hell can't do this every month, it takes forever and is extremely annoying.
I do make sure to get latest versions again after the work space mapping changes. I also tried Get specific with overwriting all files. Nothing seems to work...
Any ideas?
EDIT
Forgot to mention, openening the sln file as XML, the path to the project is actually CORRECT, but when viewing the properties on the project from within VS, it's incorrect.