我正在参考这篇文章,试图在每次构建之前复制链接的文件:
<Target Name="CopyLinkedContentFiles" BeforeTargets="Build">
<Copy SourceFiles="%(Content.Identity)"
DestinationFiles="%(Content.Link)"
SkipUnchangedFiles='true'
OverwriteReadOnlyFiles='true'
Condition="'%(Content.Link)' != ''" />
</Target>
这似乎无法在新的.NET Core csproj工具中工作。请问有没有等价的目标可用?
编辑:csproj内容示例
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Features>IOperation</Features>
<Configurations>Debug;Release;Template</Configurations>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\MyRefProject\ChangeTypes.cs" Link="ChangeTypes.cs" />
<Compile Include="..\MyRefProject\Parser.cs" Link="Parser.cs" />
<Compile Include="..\MyRefProject\Calculator.cs" Link="Calculator.cs" />
<Compile Include="..\MyRefProject\Converter.cs" Link="Converter.cs" />
</ItemGroup>
</Project>