Last post Mar 12, 2018 08:13 AM by nideeshm
Mar 03, 2018 02:43 AM|Uncharted|LINK
I have just started working with core 2.
It appears that views are precompiled now, so when you deploy you are not actually moving a view folder and cshtml file now?
I don't mind, though sometimes it is nice jumping in and editing html quickly, but mainly confirming.
Mar 05, 2018 03:11 AM|Edward Z|LINK
>> when you deploy you are not actually moving a view folder and cshtml file now?
Yes, the view folder with cshtml would not be moved, and it is compiled into <project_name>.PrecompiledViews.dll file.
This is documented below:
# Razor view compilation and precompilation in ASP.NET Core
Mar 12, 2018 08:13 AM|nideeshm|LINK
Try changing MvcRazorCompileOnPublish to "false" and see what happens. The precompilation is performed during the publish alone. During normal build and run you will still have the cshtml file, you can edit the cshtml files nad view the changes.
<PackageReference Include="Microsoft.AspNetCore.All" Version="2.0.0" />