Julien Pierre
Julien Pierre

Reputation: 467

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?

Upvotes: 1

Views: 736

Answers (2)

James Woolfenden
James Woolfenden

Reputation: 6681

Why dont you refer to them using:

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

Then you dont need to change anything.

Upvotes: 3

pantelif
pantelif

Reputation: 8544

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?)

Upvotes: 0

Related Questions