-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Open
Labels
area-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesIncludes: MVC, Actions and Controllers, Localization, CORS, most templates
Description
Previously, in .NET 9 and lower, we could use RazorRuntimeCompilation to implement embedded views in assemblies.
services.Configure<MvcRazorRuntimeCompilationOptions>( options =>
{
var embeddedFileProvider = new EmbeddedFileProvider( viewAssembly, baseNamespace );
options.FileProviders.Add( embeddedFileProvider );
} );
services.AddMvc().AddRazorRuntimeCompilation()
.AddApplicationPart( viewAssembly );
However, in .NET 10, Razor Runtime Compilation is obsolete. https://learn.microsoft.com/en-us/dotnet/core/compatibility/aspnet-core/10/razor-runtime-compilation-obsolete.
I am trying to upgrade my app to .NET 10, I am trying to find an alternative to RazorRuntimeCompilation that allows me to keep the same functionality, and am not finding a viable alternative.
glararan and daiplusplus
Metadata
Metadata
Assignees
Labels
area-mvcIncludes: MVC, Actions and Controllers, Localization, CORS, most templatesIncludes: MVC, Actions and Controllers, Localization, CORS, most templates