bytecodealliance / wasmtime-dotnet

.NET embedding of Wasmtime https://bytecodealliance.github.io/wasmtime-dotnet/
Apache License 2.0
409 stars 52 forks source link

Small tweak in src\Wasmtime.csproj can remove dependency on "unzip" #266

Closed henrikrxn closed 1 year ago

henrikrxn commented 1 year ago

I am using Windows and do not have 'unzip' in my path (I use 7-zip)

Replacing the MSBuild Exec task with another built-in MSBuild task Unzip removes the need to have

Trying to build

PS> cd src PS> dotnet build .\Wasmtime.sln

results in this error

E:\MyGithub\wasmtime-dotnet\src\Wasmtime.csproj(166,5): error MSB3073: The command "unzip wasmtime-dev-x86_64-windows-c-api.zip" exited with code 900
9.
C:\Program Files\dotnet\sdk\7.0.305\Microsoft.Common.CurrentVersion.targets(5150,5): error MSB3030: Could not copy the file "E:\MyGithub\wasmtime-dot
net\src\obj\wasmtime-dev-x86_64-windows-c-api\lib\wasmtime.dll" because it was not found. [E:\MyGithub\wasmtime-dotnet\src\Wasmtime.csproj::TargetFra
mework=net7.0]

I'll be happy to contribute a PR with the switch if you are interested.

peterhuene commented 1 year ago

Hi @henrikrxn! A PR would be quite welcome!