我有一个包含多个项目的解决方案。
假设我有项目:
P2是我的启动项目。
我想配置P2并依赖于P4,以便构建P4 ,并将P4和依赖项推送到P2的 bin 文件夹,但我不希望P2的 dll 有对P4的 .net 引用
我通过 csproj 中的特定项目参考部分成功地做到了这一点:
<ProjectReference Include="..\P4\P4.csproj">
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<OutputItemType>Content</OutputItemType>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
<Targets>Build;DebugSymbolsProjectOutputGroup</Targets>
</ProjectReference>
Run Code Online (Sandbox Code Playgroud)
但此解决方案仅添加P4而不是依赖项(P3和N1)
有谁知道该怎么做?
谢谢