0

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.

Albert
  • 1,062
  • 2
  • 13
  • 20
  • if you open from the source control window rather than from the OS folder does that work? ie open the solution from the branch in source, rather than your local workspace. – Just TFS Sep 08 '14 at 07:41
  • Hi Just TFS, Yup I have tried that, No matter which way I open the .sln, it does the same thing. – Albert Sep 08 '14 at 07:50
  • Are the projects marked as relative paths or do they contain the branch name? – Just TFS Sep 08 '14 at 08:00
  • Not quite sure where you mean, but my project 'ref' in the sln file looks like this: Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProjectName", "..\..\..\..\TeamProject\Development\Development\Source\ProjectName.csproj", "{9561177A-A096-4292-8048-D3834CD54B90}" EndProject This is correct, further down it shows it as: SccProjectName17 = ../../../../TeamProject/Development/201408 August/Source/ProjectName And that is incorrect. Even changing that to be correct, it just reverts. plus I can't do this for 35 projects each time I change workspace mapping. – Albert Sep 08 '14 at 08:04
  • looks as though your mappings are set too high they should be relative to the solution so only one or 2 jumps. where are your solution folders in your structure compared to the projects? mine look like Source\ProjectName.csproj – Just TFS Sep 08 '14 at 08:06
  • Yeah sorry, those mappings are higher than my example scenario. They are correct though, I painstakingly counted those dots :) – Albert Sep 08 '14 at 08:11
  • if the paths are relative then you can move between branches and everything should just work, those paths look to be too long :-( and not relative as such. my folder structure is sln folder with sln file and then all projects sat under the sln folder, so sln>multi projects with project file in each subfolder – Just TFS Sep 08 '14 at 08:14
  • in fact rereading your question my branches run Development>sln>project so are reversed to yours – Just TFS Sep 08 '14 at 08:16

0 Answers0