Use ZipArchive task instead of powershell.

#1937
This commit is contained in:
N. Taylor Mullen 2018-01-17 14:52:46 -08:00
parent 0584fe3ecf
commit 49a3b6bcae
1 changed files with 8 additions and 2 deletions

View File

@ -77,8 +77,14 @@
<Copy SourceFiles="$(LanguageServiceOutputPath)\%(LanguageServiceAssemblies.Identity)" DestinationFolder="$(MPackIntermediateOutputPath)" />
<Copy SourceFiles="$(AddinOutputPath)$(AddinName).dll" DestinationFolder="$(MPackIntermediateOutputPath)" />
<!-- We cannot use the ZipArchive task due to how it functions in CoreCLR. The archive it generates is unreadable by Visual Studio for Mac. -->
<Exec Command="powershell.exe -NonInteractive -command &quot;&amp; { Add-Type -AssemblyName System.IO.Compression.FileSystem; [System.IO.Compression.ZipFile]::CreateFromDirectory('$(MPackIntermediateOutputPath)', '$(MPackOutputPath)') } &quot;" />
<ItemGroup>
<MPackFiles Include="$(MPackIntermediateOutputPath)\*" />
</ItemGroup>
<ZipArchive
File="$(MPackOutputPath)"
SourceFiles="@(MPackFiles)"
WorkingDirectory="$(MPackIntermediateOutputPath)" />
</Target>
</Project>