question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failed to compile generated razor view. See CompilationErrors for detailed information

See original GitHub issue

Hello, 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:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
toddamscommented, Feb 19, 2017

Fixed

0reactions
toddamscommented, Feb 15, 2017

Seem to be a bug, thank you for the report

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found