MSBuild does not copy DLLs, while Visual Studio does
In our Visual Studio 2010 project, we reference - among others -
and copy it correctly to the folder
our local development machines. On the assembly server, this is true for all other references, but not for "SmartAssembly.Attributes.dll". Build completed successfully.
What should I check?
source to share
Open the file
file) and find the assembly reference. Then verify that the hint path is still valid on the build server. Sometimes VS2010 will add an absolute hint path instead of using one relative to the file itself
, so the drive letter might not be valid on another machine.
For example, a link might look something like the following (I've compiled the entire XML below to illustrate this, and it is NOT allowed) and the absolute path of the hint might not be valid on the build server (for example, there is no drive letter d in there):
<Reference Include="SmartAssembly.Attributes, Version=188.8.131.52, Culture=neutral, PublicKeyToken=b03f1f7f1ad5da3a, processorArchitecture=x86"> <SpecificVersion>False</SpecificVersion> <Private>true<Private> <!-- The HintPath below should exist and be valid in your build server --> <HintPath>d:\temp\SmartAssembly.Attributes.dll<HintPath> </Reference>
You can change the HintPath to be file-relative
and therefore more general. For example:
Another problem might be that
doesn't exist. This attribute is mapped to a property
in Visual Studio, so if it's missing from yours
, the DLL will not be copied to
using MSBuild. See http://bronumski.blogspot.com/2009/06/project-reference-fun-and-games.html
source to share