Like Mark, the only way to do this is to add dependent links and set CopyLocal = True.
But I agree with Danny's answer - do not use Dev Studio for your deployment, because you cannot get enough control over the build process.
Why? There is some “default” logic with Dev Studio, in which, if it calculated the value of the property, then it will not save it in the .CSPROJ file, leaving the Dev Studio instance on the other computer with the default task “ownership of something else!”
The only sure-fire way to do this is to explicitly modify the .csproj xml file directly and make sure you add True to the Reference element:
<ItemGroup> <Reference Include="ConfigManagerClient, Version=1.0.0.0, Culture=neutral, PublicKeyToken=20fc1ffb797ec904, processorArchitecture=MSIL"> <SpecificVersion>False</SpecificVersion> <HintPath>..\..\thirdparty\CM\ConfigManagerClient.dll</HintPath> <Private>True</Private> </Reference>
This behavior seems to make it almost impossible to know what your .CSPROJ file will do when it starts on another machine.
In the long run, it is much better for you not to trust the Dev Studio build and packaging process and instead use, say, Nant and explicit command lines.
source share