-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove the Windows specific dep in SDK #54
Conversation
Signed-off-by: James Sturtevant <[email protected]>
Signed-off-by: James Sturtevant <[email protected]>
deab4c7
to
37e1b96
Compare
Signed-off-by: James Sturtevant <[email protected]>
37e1b96
to
c457bd4
Compare
Signed-off-by: James Sturtevant <[email protected]>
fbef50a
to
1608049
Compare
I tried using this to build on Arch Linux, but I get an error: $ dotnet build
Restore complete (0.2s)
You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy
WitBindgen failed with 1 error(s) (68.7s)
/home/seanomik/Downloads/componentize-dotnet/src/WitBindgen/WitBindgen.csproj(73,9): error MSB3073: The command "tar -xf "temp/win-x64.zip" -C win-x64 --strip-components=1" exited with code 2. I was able to get past it by manually extracing that $ dotnet build
Restore complete (0.3s)
You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy
WitBindgen succeeded (0.0s) → /home/seanomik/Downloads/componentize-dotnet/src/WitBindgen/bin/Debug/net8.0/WitBindgen.dll
WasmComponent.Sdk succeeded (0.1s) → /home/seanomik/Downloads/componentize-dotnet/src/WasmComponent.Sdk/bin/Debug/net8.0/WasmComponent.Sdk.dll
Adder failed with 1 error(s) (0.2s) → bin/Debug/net8.0/wasi-wasm/Adder.dll
/home/seanomik/.nuget/packages/microsoft.dotnet.ilcompiler.llvm/9.0.0-preview.5.24304.1/build/Microsoft.NETCore.Native.targets(354,5): error MSB3073: The command ""\tools\\ilc" @"obj/Debug/net8.0/wasi-wasm/native/Adder.ilc.rsp"" exited with code 127. I tried changing the dotnet target version, from $ dotnet build
Restore complete (0.3s)
You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy
WitBindgen succeeded (0.0s) → /home/seanomik/Downloads/componentize-dotnet/src/WitBindgen/bin/Debug/net8.0/WitBindgen.dll
WasmComponent.Sdk succeeded (0.1s) → /home/seanomik/Downloads/componentize-dotnet/src/WasmComponent.Sdk/bin/Debug/net8.0/WasmComponent.Sdk.dll
Adder failed with 1 error(s) (0.2s) → bin/Debug/net9.0/wasi-wasm/Adder.dll
/home/seanomik/.nuget/packages/microsoft.net.illink.tasks/9.0.0-rc.2.24473.5/build/Microsoft.NET.ILLink.targets(207,5): error NETSDK1102: Optimizing assemblies for size is not supported for the selected publish configuration. Please ensure that you are publishing a self-contained app. This looks like the same error that the Ubuntu CI is running into, I'm not sure if its any farther ahead in building then the error with |
After trying a few different approach's it does not seem like this is possible. See #55 (comment). I found a few other issues that call this out: host vs published rid and NuGet/Home#1660 I also tried how Aspire dynamically adds the reference: https://github.com/dotnet/aspire/blob/c9326c75b42b28e3f3a4174f9b24bad9f22305e9/src/Aspire.AppHost.Sdk/SDK/Sdk.in.targets#L56 but it ends up that gets filtered out later because of the RID. I am going to close this and go a different direction. |
The reference to
<Import Project="build\BytecodeAlliance.Componentize.DotNet.Wasm.SDK.props" />
was causing the SDK to pull the Windows specific dep in at packaging time:
This was overriding the package reference where the runtime specific dep was being pulled in which was fixed in #50
Update: After doing some digging I found that you can't move PackageReference to the MsBuild Props: https://learn.microsoft.com/en-us/nuget/concepts/msbuild-props-and-targets#guidance-for-the-content-of-msbuild-props-and-targets
Since we don't reference the IL package anymore this forces removing the
DependsOnTargets="LinkNativeLlvm"
(which wasn't being used anyways and we don't have access toNativeOutputPath
property anymore in the testsUpdate: This is probably a good change anyways, as it is more precises