dotnet-wasm-react
dotnet-wasm-react copied to clipboard
Fails with .NET 10 rc2
When running dotnet publish with .NET 10 rc2, you get an error
Restore complete (0.7s)
info NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy
qr net10.0 browser-wasm failed with 2 error(s) (0.8s) → bin/Release/net10.0/qr.dll
ILLink : error IL1034: Root assembly 'qr, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' does not have entry point.
/home/wuzzeb/.nuget/packages/microsoft.net.illink.tasks/10.0.0-rc.2.25502.107/build/Microsoft.NET.ILLink.targets(103,5): error NETSDK1144: Optimizing assemblies for size failed.
Build failed with 2 error(s) in 1.6s
This was working with .NET rc1, so something must have changed between rc1 and rc2? Maybe rc2 requires an entrypoint again?
I was able to get it to compile on .NET 10 rc2 by switching the OutputType to exe and just adding an empty public static void Main.