You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a cross-post bug from the MAUI project (dotnet/maui#17713) at the request of their developers.
I am currently developing an app with Avalonia on .NET 7 and I was curious to see if I could move to MAUI Blazor as it'd improve my productivity. I do not plan to release the app on anything but desktop platforms, and even then I may keep it to Windows.
It is important to me to have Native AOT. I got this working with Avalonia by adding the following to my csproj:
I installed the latest MAUI and created the default MAUI Blazor project in VS. I've attempted to apply the same or similar csproj settings, starting with just <PublishAot> and each step of the way the commandline publish has spit out errors. I cannot currently get it to work.
How can I get the default start up project to publish to native AOT?
Steps to reproduce the bug
Create a new .NET Blazor MAUI App in VS.
Remove all platforms from the csproj except Windows to simply things.
Try to get it to compile to AOT.
Expected behavior
No response
Screenshots
No response
NuGet package version
None
Packaging type
Unpackaged
Windows version
Windows 11 version 22H2 (22621, 2022 Update)
IDE
Visual Studio 2022-preview, Visual Studio 2022
Additional context
No response
The text was updated successfully, but these errors were encountered:
IIRC, the biggest thing getting in the way of the Windows App SDK being usable for Native AOT is Cs/WinRT. The .NET projections are created using Cs/WinRT.
What's more, since you mentioned .NET 7, the documentation states that Native AOT is targeted at console type applications in .NET 7.
I would suspect that Native AOT will not be fully supported until .NET 8 is released and Cs/WinRT declares full compatibility.
IIRC, the biggest thing getting in the way of the Windows App SDK being usable for Native AOT is Cs/WinRT. The .NET projections are created using Cs/WinRT. What's more, since you mentioned .NET 7, the documentation states that Native AOT is targeted at console type applications in .NET 7. I would suspect that Native AOT will not be fully supported until .NET 8 is released and Cs/WinRT declares full compatibility.
Note that whilst I initially tried it on net 7 i since moved to NET 8 RC1 and had the same issue.
Describe the bug
This is a cross-post bug from the MAUI project (dotnet/maui#17713) at the request of their developers.
I am currently developing an app with Avalonia on .NET 7 and I was curious to see if I could move to MAUI Blazor as it'd improve my productivity. I do not plan to release the app on anything but desktop platforms, and even then I may keep it to Windows.
It is important to me to have Native AOT. I got this working with Avalonia by adding the following to my csproj:
I installed the latest MAUI and created the default MAUI Blazor project in VS. I've attempted to apply the same or similar csproj settings, starting with just
<PublishAot>
and each step of the way the commandline publish has spit out errors. I cannot currently get it to work.How can I get the default start up project to publish to native AOT?
Steps to reproduce the bug
Expected behavior
No response
Screenshots
No response
NuGet package version
None
Packaging type
Unpackaged
Windows version
Windows 11 version 22H2 (22621, 2022 Update)
IDE
Visual Studio 2022-preview, Visual Studio 2022
Additional context
No response
The text was updated successfully, but these errors were encountered: