Embedded Views in ASP.NET Core 10
- Dominant language
- C#
- Stars
- 38.4k
- Forks
- 10.9k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 290
Description
Previously, in .NET 9 and lower, we could use RazorRuntimeCompilation to implement embedded views in assemblies.
```
services.Configure( 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.
Contributor guide
Assessment
This issue has not been assessed yet.