Skip to content

Still seeing runtime compilation when using StackExchange.Precompilation.Build #38

Description

@mike-riedel

I believe I've followed the necessary steps to use precompiled .cshtml views but when I run my web app and click on various pages, I still see significant delays and see VBCSCompiler.exe appearing in Task Manager, leading me to believe that the precompiled views are not being used.

Do I have the wrong expectations about what this package does or am I doing something wrong?

I followed these steps, per the instructions on github:

  1. Added the StackExchange.Precompilation.Build and StackExchange.Precompilation nugets to web project which uses Razor and .cshtml files
  2. Added true to .csproj
  3. Cleared existing ViewEngines and added new instance of PrecompiledViewEngine followed by RoslynRazorViewEngine

In the build output I've verified StackExchange.Precompiler.exe is being run, and while debugging I've verified PrecompiledViewEngine is finding what seem to be precompiled views in the project's assembly. And yet, I still see long delays and VBCSCompiler being run whenever new cshtml views are accessed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions