我有一个程序集X,它引用了库文件夹中的System.Interactive和System.Reactive。然后我有一个引用X的程序集Y。
在X中,对于System.Interactive和System.Reactive,'Copy Local‘都设置为true。在Y中,X的'Copy Local‘设置为true。System.Reactive和System.Interactive不在GAC中。
当我构建Y时,System.Interactive和System.Reactive没有被复制到输出目录。为什么?
发布于 2011-07-18 21:03:21
Y不继承X的"copy local“选项。如果您希望System.Interactive和System.Reactive与Y一起部署,则从Y引用它们,并在Y中将它们标记为"Copy Local = true”。
发布于 2011-07-20 18:04:30
这似乎可以解决这个问题:How does visual studio determine what to copy to the output directory with multi-project solutions?
我手动将.csproj中的True添加到项目Y中对X的引用中,程序集被复制到输出目录中。
发布于 2016-03-16 21:45:05
不需要在主项目中添加引用。100%工作并将dll复制到bin文件夹。
<Reference Include="NM86">
<HintPath>..\..\..\NM86.dll</HintPath>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<SpecificVersion>False</SpecificVersion>
<Private>True</Private>
</Reference>
<Content Include="..\..\..\NM86.dll">
<Link>NM86.dll</Link>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<SpecificVersion>False</SpecificVersion>
</Content>https://stackoverflow.com/questions/6733246
复制相似问题