Failed to compile generated razor view. See CompilationErrors for detailed information
See original GitHub issueHello, I’m trying to use a non-anonymous object and am getting the following error:
Failed to compile generated razor view. See CompilationErrors for detailed information
public class TestModel
{
public string Name { get; set; }
}
var model = new TestModel()
{
Name = "John Doe"
};
var engine = EngineFactory.CreatePhysical(@"D:\");
string result = engine.ParseString("Hello @Model.Name ", model, model.GetType());
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Failed to compile generated Razor template ...
I had the exact same issue, but only within my published application. While debugging the worker service i didn't get the error message....
Read more >Razor file compilation in ASP.NET Core
Learn how compilation of Razor files occurs in an ASP.NET Core app.
Read more >ASP.NET Core Recipes: A Problem-Solution Approach
NET MVC Project To import project files, from Solution Explorer, ... The build will fail, and you should see about six errors in...
Read more >Apps and Services with .NET 7: Build practical projects with ...
Build practical projects with Blazor, . ... the compiler complains and refuses to compile the source code, as shown in the following output:...
Read more >ASP.NET Core Razor Pages in Action - Page 345 - Google Books Result
... by the build process. You can find the assembly in \bin\Debug\[.NET app version]\. The string.Concat method in the ExecuteAsync method was generated...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Fixed
Seem to be a bug, thank you for the report