In our Visual Studio 2010 project we reference – among the others – the SmartAssembly.Attributes.dll and it’s properly copied to the Bin/Debug or Bin/Release folder of our local dev machines. On the build server this is true for all other references but not for ‘SmartAssembly.Attributes.dll’. The build succeeds.
What should I check?
Thanks.
Open your
.csprojfile (or.vbprojfile), and look for the assembly reference. Then make sure the hint path is still valid in your build server. Sometimes VS2010 will add an absolute hint path, instead of using one relative to the.csprojfile itself, so the drive letter may be invalid in another machine.For example, the reference may look similar to the one below (I made up all of the XML below to illustrate only and it’s NOT valid), and the absolute hint path may be invalid in the build server (e.g. there’s no drive letter d there):
You can change the HintPath to make it relative to the
.csprojfile and therefore more general. For example:Another problem may be that
<Private>true<Private>isn’t there. This attribute mapped to theCopyLocalproperty in Visual Studio, so if it’s missing from your.csproj, the DLL won’t get copied tobin\Debugorbin\Releaseby MSBuild. See http://bronumski.blogspot.com/2009/06/project-reference-fun-and-games.html