我正在通过NuGet .targets文件添加链接内容:
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Content Include="..\packages\MyPackage.1.2.3\tools\MyFiles\**">
<Link>%(RecursiveDir)%(FileName)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
</Project>
是否有可用于引用MyPackage.1.2.3的变量? 我不喜欢这里的硬编码包版本。