-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Description
Description
Trying to build a project targeting wasi-wasm with latest preview results in:
C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Wasi.Sdk\8.0.0-rc.2.23479.6\Sdk\WasiApp.Native.targets(54,5): error : Could not fin
d wasi-sdk. Either set $(WASI_SDK_PATH), or use workloads to get the sdk. SDK is required for building native files.
Reproduction Steps
Build any project with <RuntimeIdentifier>wasi-wasm</RuntimeIdentifier>, e.g. the default wasi console template while not having WASI SDK installed globally.
Expected behavior
It should provision WASI SDK automatically when installing the wasi-experimental workload. It seems there is some code for this in the repo
Lines 174 to 186 in af0227f
| <Target Name="ProvisionWasiSdk" | |
| Condition="'$(ShouldProvisionWasiSdk)' == 'true' and '$(SkipMonoCrossJitConfigure)' != 'true'"> | |
| <ReadLinesFromFile File="$(MSBuildThisFileDirectory)/wasi/wasi-sdk-version.txt"> | |
| <Output TaskParameter="Lines" ItemName="_VersionLines" /> | |
| </ReadLinesFromFile> | |
| <PropertyGroup> | |
| <WasiLocalPath>$([MSBuild]::NormalizeDirectory('$(MSBuildThisFileDirectory)', 'wasi'))</WasiLocalPath> | |
| <WasiSdkVersion>%(_VersionLines.Identity)</WasiSdkVersion> | |
| <WasiSdkUrl>https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-$(WasiSdkVersion)/wasi-sdk-$(WasiSdkVersion).0-linux.tar.gz</WasiSdkUrl> | |
| <WasiSdkUrl Condition="'$(HostOS)' == 'osx'" >https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-$(WasiSdkVersion)/wasi-sdk-$(WasiSdkVersion).0-macos.tar.gz</WasiSdkUrl> | |
| <WasiSdkUrl Condition="'$(HostOS)' == 'windows'" >https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-$(WasiSdkVersion)/wasi-sdk-$(WasiSdkVersion).0.m-mingw.tar.gz</WasiSdkUrl> | |
| </PropertyGroup> |
Alternatively, at least provide a clear error message on how to retrieve one manually for now.
Actual behavior
The error message says
or use workloads to get the sdk
even though that doesn't seem to be supported.
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
No response