bytecodealliance / componentize-dotnet

Tooling for creating WebAssembly components from C#
Apache License 2.0
32 stars 9 forks source link

error NETSDK1102 when build in .Net 9 #49

Open drunkenQCat opened 3 weeks ago

drunkenQCat commented 3 weeks ago

I edit my project following the instruction, but failed. The error message is just like this:

  wasiDotnet failed,thr (0.3 seconds) → bin\Debug\net9.0\wasi-wasm\wasiDotnet.dll
    C:\Users\Administrator\.nuget\packages\microsoft.net.illink.tasks\9.0.0-rc.1.24431.7\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.

Until I added <SelfContained>true</SelfContained>.

jsturtevant commented 3 weeks ago

Thanks! we noticed this as well and have a staged pr in https://github.com/bytecodealliance/componentize-dotnet/pull/48 to add a comment.

This is only need when using .net9 sdk