In an asp.net core 2.0 project, I would like to force the publish of Views because I need them at runtime. Any clues?
Joe's answer is for .Net Core 2.
In .Net Core 3, if you are using the default services.AddControllersWithViews() in your Startup.cs then you need to use RazorCompileOnPublish.
netcoreapp3.1
true
false
Also, if you need to enable Razor Runtime Compilation in Core 3, you require to install the "Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" package, then add the AddRazorRuntimeCompilation.
services.AddControllersWithViews()
.AddRazorRuntimeCompilation();