Tôi quyết định sử dụng tác vụ Zip của MSBuild Extension để nén một số mã nguồn của tôi ở mọi bản dựng.Cách sử dụng tác vụ Zip của MSBuild extension?
Tuy nhiên, đây không phải tác phẩm:
<UsingTask TaskName="MSBuild.ExtensionPack.Compression.Zip" AssemblyFile="MSBuild.ExtensionPack.dll" />
<Target Name="AfterBuild">
<CallTarget Targets="ZipSourceFiles" />
</Target>
<Target Name="ZipSourceFiles" Condition="'$(ConfigTransform)'=='ImRunningOnTheServer'">
<MSBuild.ExtensionPack.Compression.Zip TaskAction="Create" CompressFiles="c:\source.txt" ZipFileName="C:\target.zip"/>
</Target>
tôi nhận được thông báo lỗi sau:
The "MSBuild.ExtensionPack.Compression.Zip" task was not found. Check the following: 1.) The name of the task in the project file is the same as the name of the task class. 2.) The task class is "public" and implements the Microsoft.Build.Framework.ITask interface. 3.) The task is correctly declared with <UsingTask> in the project file, or in the *.tasks files located in the "c:\Windows\Microsoft.NET\Framework\v4.0.30319" directory.
Tôi không biết những gì gây ra lỗi này? Bất kỳ ý tưởng?
Có * có * là Gói mở rộng MSBuild không? Tôi không bao giờ sử dụng nó, nhưng tôi có thể cung cấp cho bạn một ví dụ làm việc cho [MSBuild Community Tasks] (https://github.com/loresoft/msbuildtasks) để thay thế. –
Nó không phải là gói này. Nó chỉ cần zip các tập tin một cách chính xác :) – Zsolt