参考路径与参考本地副本路径

5
有没有 ReferencePath 和带有条件 '%(CopyLocal)'=='true'ReferenceCopyLocalPaths 之间的区别?
这个问题是由这个答案提出的,该答案在两段代码中都使用了这两种方式。
1个回答

14

ReferencePath: 已解析的主文件路径。

ReferenceCopyLocalPaths: 标记为 "CopyLocal" 的引用及其依赖项,包括 .pdbs、.xmls和卫星程序集。

要测试每个项目的内容,请将此内容添加到您的 .csproj 文件中:

<Target Name="AfterBuild">
    <Message Text="1. ReferencePath:%0D%0A%09@(ReferencePath->'$(OutDir)%(DestinationSubDirectory)%(Filename)%(Extension)', '%0D%0A%09')" />
    <Message Text="2. ReferenceCopyLocalPaths:%0D%0A%09@(ReferenceCopyLocalPaths->'$(OutDir)%(DestinationSubDirectory)%(Filename)%(Extension)', '%0D%0A%09')" />
</Target>

2
如果您使用Visual Studio构建项目,请不要忘记Importance="High"属性。https://dev59.com/wGkv5IYBdhLWcg3wjxdl#10518668 - resnyanskiy

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接