-
Notifications
You must be signed in to change notification settings - Fork 260
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
error while using .UseEmbeddedResourcesProject(System.Reflection.Assembly.GetEntryAssembly()) #474
Comments
Did you read the error message? It says: Put a breakpoint and check that please. |
@passronny @jzabroski is this issue resolved? |
@vijkumarsharma I will repeat:
Your last reply in #250 was vague and non-constructive. I don't know what you see, and you made no efforts to describe what you see when you put a breakpoint. Describing something as "not fruitful" and "the same issue" is not descriptive. At most, you can conclude you have the same error message, not the same issue. |
Can you verify that you set the "Build Action" to "Embedded resource" in the properties of the .cshtml files? I had a similar issue and realized I forgot this step. |
Close this as it seems to be something people report when they don't read the FAQ or exception message |
hi I am using razorlight in .net core2.2 MVC web project, i have registered the services of razorlight in the Startup.cs class as shown below
` var engine = new RazorLightEngineBuilder()
.UseEmbeddedResourcesProject(System.Reflection.Assembly.GetEntryAssembly())
//.UseFileSystemProject($"{RootPath}\Views")
.EnableDebugMode(true)
.UseMemoryCachingProvider()
.Build();
i have also created a generic class that converts my views to string , one of the methods is below
` public async Task GenerateNotificationContent(string messageBody,
string pathToView)
{
var model = new CustomEmailMessageModel
{
MessageBody = messageBody
};
the views that i want are in the Views folder of the project, so when calling the above method i provide the path to the view that i want e.g Views/Subfolder/View but im getting the below error
RazorLightProjectItem of type RazorLight.Razor.EmbeddedRazorProjectItem with key Views/Subfolder/view.cshtml could not be found by the RazorLightProject of type RazorLight.Razor.EmbeddedRazorProject and does not exist in dynamic templates. See the "KnownDynamicTemplateKeys" and "KnownProjectTemplateKeys" properties for known template keys.
what am i doing wrong
The text was updated successfully, but these errors were encountered: