1

Previously, in .NET 9 and lower, we could use RazorRuntimeCompiliation 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 Compliation 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 RazorRuntimeCompliation and am not finding a viable alternative. Anyone have any ideas?

New contributor
StarCat-At-CTC is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.