see docs:
Is there dynamic compilation in ASP.NET Core 5 Razor Pages
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.
4 answers
Sort by: Most helpful
-
-
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.
-
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.
-
Sreeju Nair 12,371 Reputation points
2021-09-07T12:06:13.193+00:00 Yes, ASP.Net Razor pages support compilation. Refer this