Skip to content

Conversation

DashNY
Copy link

@DashNY DashNY commented Jun 11, 2024

This PR updates the references to Microsoft.AspNetCore.Razor.Language and Microsoft.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.

@DashNY
Copy link
Author

DashNY commented Jun 14, 2024

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.

@adoconnection
Copy link
Owner

Hi, sorry, was a bit busy. Thanks for PR looks good to me! Very handy update

@lpottimuthi
Copy link

Hi, sorry, was a bit busy. Thanks for PR looks good to me! Very handy update

Hi, this might be useful for us as well. Could this be merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants