Merging from Main to other Branches

Sep 2, 2011 at 5:28 PM

I have the following branches in Team Project X:

Main (references the release assembly files from Team Project Y)

Dev1 (references the debug assembly files from Team Project Y)

Dev2 (references the debug assembly files from Team Project Y)

Release (references the release assembly files from Team Project Y)

Note: Team Project Y is the framework team project where I store common projects as well as Files such as Assemblies (Debug, Release), Company Key, Code Analysis custom setting file.

My issue: When merging (Forward Integration) from Main back to Dev1 or Dev2 the reference path are overwritten. In other words, the reference path on Dev is changed from .../debug/... to .../release/...

As a result, my build definition for Dev1 and Dev2 breaks.

My build definition for Dev1, for example, contains two paths in the workspace:

  1. path to the .sln file in Dev1 (to build the whole solution)
  2. path to the assembly debug (not the release) folder in Team Project Y

What strategy should I use to overcome my problem. Thanks in advance!

Sep 2, 2011 at 5:55 PM

Anytime you change the target of a project or assembly reference, you will have this problem. Why not reference the release assembly files from all branches?


Bill Heys
VS ALM Ranger

Sep 2, 2011 at 8:39 PM

Bill thanks for your reply!

I will use the release version of the assembly files in the projects. But, after little more investigation I found that the problem is something else...

Scenario 1: When I merge (FI) from MAIN to RELEASE branch, the Release Branch breaks. 

Scenario 2: When I merge (RI) from RELEASE to MAIN branch, the MAIN Branch breaks.


What I have found out is that, lets say Scenario 1,

  1. For a project in the MAIN branch I add a file reference to C:\Projects\Framework\Files\Assemblies\Release\Microsoft.Practices.EnterpriseLibrary.Common.dll
  2. I build, check-in the code, a triggered build is initiated. Every builds fine in the MAIN branch.
  3. Then, I merge the Main (FI) with the RELEASE branch, that file reference morphs to C:\Projects\<TeamProjectName>\Main\Src\<ProjectName>\Src\Data\DL\bin\Release\Microsoft.Practices.EnterpriseLibrary.Common.dll

You have two options to add references to a project (VB.NET):

  1. Go to the project property windows, reference tab, then add the reference there. The Specific Version is set to False
  2. Right click the reference folder in the project, then select "Add Reference". After the reference is added check the reference properties in the properties window. The Specific Version is set to True (Why? bug?). When you toggle that value to false the Path changes to C:\Projects\<TeamProjectName>\Main\Src\<ProjectName>\Src\Data\DL\bin\Release\Microsoft.Practices.EnterpriseLibrary.Common.dll

If I do option #2, that is when merging from MAIN to RELEASE will cause a problem for me. On the other hand, if I use option #1, where the Specific Version is set to False and the path doesn't toggle everything is fine.

Very weird. Is this a bug? If not is there an article you can point me to read more on. Thanks!