I’m trying to get MSBuild working on a project that has just been moved to TFS2008. The solution was huge, so it was split into 5 team projects, A-E. Each one has only one solution but several projects. A is relient on B-E being built first. We need to build both debug and release versions of everything, which is fine, but when we compile A in release mode it uses the debug versions of B-E. Having looked in the proj files of the projects in A, their assembly references have been set to point to the debug versions of the libraries in B-E. Is there any way using an MSBuild proj file to make the release of A reference the release versions of projects in B-E?
So far i’ve tried adding
<PropertyGroup>
<AssemblySearchPaths>
$(Configuration)
$(AssemblySearchPaths)
</AssemblySearchPaths>
</PropertyGroup>
to the MSBuild proj file, but it doesn’t make any difference. Any suggestions?
I’m trying to get MSBuild working on a project that has just been moved
Share
(This is an alternative answer if you want to do it all within your .prof files)
You could set the reference path on each of the property groups for the various configurations.
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <ReferencePath>c:\blah\blah\Path\To\Debug\</ReferencePath> </PropertyGroup><PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<ReferencePath>c:\blah\blah\Path\To\Release\</ReferencePath>
</PropertyGroup>You should already have the conditional property groups in the .proj file, so just add the refernece path bit to them. You can have multiple paths by separating them with semi colons.