Skip to content

Adding wit from OCI generates cmd error on dotnet build #67

@usergood

Description

@usergood

When adding OCI wit, it generates an error when running dotnet build on the windows-plattform.

Project.csproj

<ItemGroup>
      <Wit Remove="**\*.wit" />
      <Wit Include="wit/wit.wasm" World="proxy" Registry="ghcr.io/webassembly/wasi/http:0.2.0" />
</ItemGroup>

Output from dotnet build

Restore complete (0,4s)
  Project failed with 2 error(s) (1,3s)
    EXEC : error : Unable to write file
    C:\Users\USERNAME\.nuget\packages\bytecodealliance.componentize.dotnet.witbindgen\0.5.0-preview00008\build\BytecodeAlliance.Componentize.DotNet.WitBindgen.targets(60,9): error MSB3073: The command "C:\Users\USERNAME\.nuget\packages\bytecodealliance.componentize.dotnet.witbindgen\0.5.0-preview00008\build\..\tools\win-x64\wkg.exe oci pull ghcr.io/webassembly/wasi/http:0.2.0 --output wit;wit/wit.wasm" exited with code 1.

Build failed with 2 error(s) in 2,0s

It works fine if you run the the correct command once for the project.

C:\Users\USERNAME\.nuget\packages\bytecodealliance.componentize.dotnet.witbindgen\0.5.0-preview00008\build\..\tools\win-x64\wkg.exe oci pull ghcr.io/webassembly/wasi/http:0.2.0 --output wit/wit.wasm

So somewhere it adds wit; as a prefix to the bindget command.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions