Closed felixf4xu closed 2 days ago
In a Uno project with multiple TargetFrameworks, I can't set <PublishAot> to enable AOT, the error message is:
TargetFrameworks
<PublishAot>
error NETSDK1203: Ahead-of-time compilation is not supported for the target runtime identifier 'browser-wasm'.
Standard AOT configurations should be able to use in Uno project file, like:
<PublishTrimmed>true</PublishTrimmed> <PublishAot>true</PublishAot> <PublishSingleFile>true</PublishSingleFile>
A project file with multiple TargetFrameworks:
<TargetFrameworks>net9.0-android;net9.0-ios;net9.0-maccatalyst;net9.0-windows10.0.26100;net9.0-browserwasm;net9.0-desktop</TargetFrameworks>
Add these configurations into the .csproj file
then run dotnet publish -f net9.0-desktop
dotnet publish -f net9.0-desktop
I have to remove net9.0-browserwasm from the <TargetFrameworks> temporarily to run:
net9.0-browserwasm
<TargetFrameworks>
None
No response
Visual Studio 2022
Same error on Ubuntu if only dotnet publish -f net9.0-desktop is used (no VS publish)
Current behavior
In a Uno project with multiple
TargetFrameworks
, I can't set<PublishAot>
to enable AOT, the error message is:Expected behavior
Standard AOT configurations should be able to use in Uno project file, like:
How to reproduce it (as minimally and precisely as possible)
A project file with multiple TargetFrameworks:
Add these configurations into the .csproj file
then run
dotnet publish -f net9.0-desktop
Workaround
I have to remove
net9.0-browserwasm
from the<TargetFrameworks>
temporarily to run:Works on UWP/WinUI
None
Environment
No response
NuGet package version(s)
No response
Affected platforms
No response
IDE
Visual Studio 2022
IDE version
No response
Relevant plugins
No response
Anything else we need to know?
Same error on Ubuntu if only
dotnet publish -f net9.0-desktop
is used (no VS publish)