Is there dynamic compilation in ASP.NET Core 5 Razor Pages

Richard 1 Reputation point
2021-08-25T20:23:56.63+00:00

We currently have a large website using asp.net webforms framework 4 C# and it was easy and quick to upload a single modified cs file to production server because of asp.net's dynamic compilation. Is there dynamic compilation for ASP.NET Core 5 Razor Pages as I don't see it in the MS document?

We don't want to recompile the whole website files as it results in a long compile time which in turn results in a very large dll which in turn takes forever to upload to production server. Any solution is welcome.

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,663 questions
{count} votes

4 answers

Sort by: Most helpful
  1. Bruce (SqlWork.com) 67,906 Reputation points
    2021-08-25T22:11:04.917+00:00
    0 comments No comments

  2. Richard 1 Reputation point
    2021-08-26T20:21:12.373+00:00

    @Bruce (SqlWork.com) The doc doesn't say how to avoid compiling the whole website when a single file with the extension .cs is modified.

    0 comments No comments

  3. Bruce (SqlWork.com) 67,906 Reputation points
    2021-08-28T15:35:28.287+00:00

    Old asp.net used app domains to host the web application, and each view was compiled to an individual dll, that was dynamically loaded. After a set number of recompiles a new domain was created, and the old domain unloaded.

    For startup performance, view recompile was added.

    .net core does not support app domains. And was designed for view precompile at the start. Currently there is no support for individual view recompile, it’s always the whole site.

    0 comments No comments

  4. Sreeju Nair 12,371 Reputation points
    2021-09-07T12:06:13.193+00:00

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.