我希望$(fooAssemblyInfo.Version)在我的BuildRepositoryZip任务中工作,但它不是。为什么?我是否必须移出ItemName或者远离Target assemblyversion,在那种情况下是如何完成的?
<Target Name="AssemblyVersion">
<GetAssemblyIdentity AssemblyFiles="..\Tools\Utility.dll">
<Output TaskParameter="Assemblies" ItemName="fooAssemblyInfo"/>
</GetAssemblyIdentity>
<Message Text="%(fooAssemblyInfo.Version)" />
</Target>
<!-- Zipping all *.zip to a package for repository server-->
<Target Name="BuildRepositoryZip" DependsOnTargets="AssemblyVersion">
<!-- Create a zip file based on a Path -->
<MSBuild.ExtensionPack.Compression.Zip TaskAction="Create" CompressPath="..\..\Deploy\*.zip" ZipFileName="..\..\$(fooAssemblyInfo.Version).zip"/>
</Target>