Deal with assemblies references when using Team Foundation Server

I use TFS 2010 and I'm having to change references of assemblies that I build from Debug to Release when I merge into the Main or Release branch.

When working on the Dev branch, I use the Debug assemblies, but I merge down to the Main or Release branch I need to manually change, and it's really time consuming.

Has anyone got best practices, or solutions?

-------------Problems Reply------------

Why dont you refer to them using:

<Reference Include="Assembly">
<HintPath>..\$(Configuration)\Assembly.dll</HintPath>
</Reference>

Then you dont need to change anything.

If the assemblies are identical I suppose the only difference between a *.csproj in Dev & the same *.csproj in Main/Release would be something like:

<Reference Include="Assembly">
<HintPath>..\Debug\Assembly.dll</HintPath>
</Reference>

and then

<Reference Include="Assembly">
<HintPath>..\Release\Assembly.dll</HintPath>
</Reference>

As a first step, you could create a small console application that automates this with find & replace in all the project files involved. You could then run this app each time you do a merge.
The only thing you would need from TFS-SDk is the ability to checkout the *.csproj files.

(Another possible angle: Do you really need the Debug-version of the assembly in the DEV-branch?)

Category:visual studio 2010 Views:0 Time:2011-07-27

Related post

Copyright (C) dskims.com, All Rights Reserved.

processed in 0.202 (s). 11 q(s)