Skip to content

build failed #87

Description

@snikeguo

PS E:> dotnet build MyApp
还原完成(0.4)
你正在使用 .NET 的预览版。请参阅 https://aka.ms/dotnet-support-policy
MyApp 失败,出现 1 错误 (0.7 秒) → E:\MyApp\bin\Debug\net10.0\wasi-wasm\MyApp.dll
C:\Users\Administrator.nuget\packages\microsoft.dotnet.ilcompiler.llvm\10.0.0-alpha.1.25162.1\build\Microsoft.NETCore.Native.targets(409,5): error MSB3073: 命令“"C:\Users\Administrator.wasi-sdk\wasi-sdk-24.0/bin/wasm-component-ld" --version”已退出,代码为 3。

在 1.5 秒内生成 失败,出现 1 错误

Activity

  1. snikeguo commented on Mar 28, 2025

    @snikeguo
    Author

    Solution: Extract and copy manually.

    tar -xf ....temp path/was*....tar.gz

    copying bin lib share to C:\Users\Administrator.wasi-sdk\wasi-sdk-24.0

  2. jsturtevant commented on Apr 8, 2025

    @jsturtevant
    Contributor

    what does your .csproj look like?

    could you try running dotnet msbuild src/WitBindgen/build/BytecodeAlliance.Componentize.DotNet.WitBindgen.targets /t:PrepareWasmSdks to run only the sdk installer?

  3. ray440 commented on Apr 23, 2025

    @ray440

    I'm getting the same problem:

    $ dotnet build
    Restore complete (0.5s)
    You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy
      MyWasmApp failed with 1 error(s) (2.3s) → bin\Debug\net10.0\wasi-wasm\MyWasmApp.dll
        C:\Users\me\.nuget\packages\microsoft.dotnet.ilcompiler.llvm\10.0.0-alpha.1.25162.1\build\Microsoft.NETCore.Native.targets(409,5): error MSB3073: The command ""C:\Users\ray\.wasi-sdk\wasi-sdk-24.0/bin/wasm-component-ld" --version" exited with code 3.
    
    Build failed with 1 error(s) in 3.4s
    

    Running dotnet msbuild src/WitBindgen/build/BytecodeAlliance.Componentize.DotNet.WitBindgen.targets /t:PrepareWasmSdks ran without complaints.

    But I still can't find wasm-component-ld

  4. jsturtevant commented on Apr 24, 2025

    @jsturtevant
    Contributor

    @ray440 does wasm-component-ld exist at the path? Are you on Windows or WSL? looks like the file path might be getting mixed up?

  5. ray440 commented on Apr 24, 2025

    @ray440

    @ray440 does wasm-component-ld exist at the path? Are you on Windows or WSL? looks like the file path might be getting mixed up?

    I'm on Windows, in powershell. There are many problems:
    C:\Users\ray\.wasi-sdk\wasi-sdk-16.0\bin exists, but C:\Users\ray\.wasi-sdk\wasi-sdk-24.0 is empty.
    In either case wasm-component-ld doesn't exist anywhere. How do I set this up properly?

  6. ray440 commented on Apr 28, 2025

    @ray440

    How do I set this up properly?

    Got it. I had to manually extract
    wasi-sdk-24.0-x86_64-windows.tar.gz from releases to the appropriate directory, C:\Users\{login-name}\.wasi-sdk\wasi-sdk-24.0.

  7. jsturtevant commented on May 12, 2025

    @jsturtevant
    Contributor

    C:\Users\ray.wasi-sdk\wasi-sdk-16.0\bin exists, but C:\Users\ray.wasi-sdk\wasi-sdk-24.0 is empty.

    It seems there might be some issue if a previous various already exists on the system. It is interesting that the fold was empty. In CI we always start from scratch so it might be there is a bug here somewhere

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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