Razor file compilation in ASP.NET Core | Microsoft Docs[^]: Build-time and publish-time compilation of Razor files is enabled by default by the Razor SDK. When enabled, runtime compilation complements build-time compilation, allowing Razor files to be updated if they're edited.
<PropertyGroup> <PreserveCompilationContext>true</PreserveCompilationContext> <MvcRazorCompileOnPublish>false</MvcRazorCompileOnPublish> <CopyRazorGenerateFilesToPublishDirectory>true</CopyRazorGenerateFilesToPublishDirectory> </PropertyGroup>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)