Hi,
How did you refer to the Assembly1.dll in HostService?
When TFSBuild builds a project that has a assembly reference, it will try to get the reference in the HintPath
defined in the project file(*.csproj) first, then in GAC and additional reference path.
<ItemGroup>
<Reference Include="ClassLibrary, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\ref\ClassLibrary.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Xml.Linq">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data.DataSetExtensions">
<RequiredTargetFramework>3.5</RequiredTargetFramework>
</Reference>
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
In your scenario, TfsBuild failed to get the assembly1.dll in the path, so it got the one in shared folder.
To fixed this,
First, map HostService and MainService in your workspace with the correct structure. So that when you refer to assembly1.dll, the project will use the relative path in HintPath
Then, make sure the workspace of the build definition is the same as your local structure.
Best regards,
Ruiz
MSDN Subscriber Support in Forum
If you have any feedback on our support, please contact msdnmg @ microsoft.com