dotnet / aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
https://asp.net
MIT License
35.42k stars 10.01k forks source link

Publish only front-end razor pages - .cshtml #55091

Open ISPCopilot opened 6 months ago

ISPCopilot commented 6 months ago

When we make tiny html or content changes on a .cshtml page - no code-behind cshtml.cs file involved, we have to publish the whole razor pages project to apply the changes. That's really not ideal since it restarts the application and interprets the production.

Is there a way to just publish the .cshtml file instead of publishing the whole project just for web content changes? Like old ASP.NET WebForms, we can just publish .aspx file if no changes are made from code-behind cs file.

If not, is there any alternative? Thank you.

ISPCopilot commented 6 months ago

Is there any workaround regarding the issue?

KennethHoff commented 6 months ago

The Razor Runtime Compilation package might help? My experience with that package is quite bad, but then again I had no need for it in production so I didn't look into it too much