Open DashNY opened 1 month ago
hey @adoconnection just checking if you had a chance to review. Without this change, we're force to manually pin those newer versions in our .csproj
files to fix the AOT publishing. It would be great to avoid that. Thanks.
Hi, sorry, was a bit busy. Thanks for PR looks good to me! Very handy update
This PR updates the references to
Microsoft.AspNetCore.Razor.Language
andMicrosoft.CodeAnalysis.CSharp
to their latest versions in order to fix the Ahead-of-Time (AOT) compilation of the assembly in .NET 8.AOT allows publishing of your entire application as a single executable, with all assemblies pre-compiled natively, resulting in faster startup time. The older versions of those libraries are not compatible with AOT and cause errors when publishing for AOT.
The upgrade does not appear to cause any issues, and all tests still pass. I've added ExampleAppNET8 project, and AOT functionality can be tested by right-clicking it and selecting Publish.