Publishing single page from ASP.NET Core Razor project RRS feed

  • Question

  • User1707247976 posted

    I have an ASP.NET Core project using Razor pages, I published the project from Visual studio 2019 to an Azure web app, Its working fine.

    But when I doing a change in a single page, I want to publish the only modified page to the host, I'm doing this from : Project menu----> Publish page.cshtml, Visual studio is telling me the file has published successfully, but I do not see any change in the online page.

    Is there is any missing step after publishing the page?

    Kindly help me regarding this issue.

    Monday, March 2, 2020 2:59 PM

All replies

  • User711641945 posted

    Hi Zanest,

    As far as I known,when you publish to the site,all the razor pages would generate into one compile file which is named like `ProjectName.View.dll`.So although you publish single page,it could not change in your site.

    Best Regards,


    Tuesday, March 3, 2020 9:54 AM
  • User1707247976 posted

    Hi Rena,

    Thank you for your answer,

    Yes, you are right,

    Kindly advice me regarding another way for publishing the project via Visual studio in order to publish single pages after that.


    Tuesday, March 3, 2020 12:11 PM
  • User753101303 posted


    Try to apply https://docs.microsoft.com/en-us/aspnet/core/mvc/views/view-compilation?view=aspnetcore-3.1 which explains how to enable runtime compilation for Razor files (I never tried).

    Tuesday, March 3, 2020 12:20 PM