toddams / RazorLight

Template engine based on Microsoft's Razor parsing engine for .NET Core
Apache License 2.0
1.51k stars 261 forks source link

Use Microsoft.Extensions.FileProviders.EmbeddedFileProvider #404

Open jzabroski opened 3 years ago

jzabroski commented 3 years ago

@maxbanas I just (re-)discovered this interface today: https://docs.microsoft.com/en-us/dotnet/api/microsoft.extensions.fileproviders.embeddedfileprovider?view=dotnet-plat-ext-3.1

knuxbbs commented 3 years ago

What about the EmbedRazorGenerateSources property from the Razor SDK? According to the documentation:

When true, adds RazorGenerate ( .cshtml ) items as embedded files to the generated Razor assembly. Defaults to false.

RazorLight can't get these .cshtml files.

jzabroski commented 3 years ago

We're not generating a Razor Assembly as such, so you are correct, there is nothing to get to. This issue is about standardization and writing less code and using common interfaces. The aim of this project is not to re-implement all of ASP.NET Core Razor. Microsoft literally had a team of 4 people working on Razor for years.