locked
How do I precompile Web Applicatiob Project updated page RRS feed

  • Question

  • User-218090889 posted

    Hello,

    I have a site in WAP hosted in winhost server, the site has many page, but each time I modify the code-behind of a single page using Visual Studio the whole existing file in the remote directory will have to be deleted and replaced with new ones when I publish it.

    I do not want it that way.
    How do I compile just the single affected page and upload that alone?

    Friday, January 12, 2018 1:48 PM

All replies

  • User347430248 posted

    Hi Enzyme,

    If you are changing the code behind then it is not possible/ recommended to publish the single file.

    Code in each page is compiled into a separate page assembly. References to objects outside of that page are updated during the build process. Taking the built assembly for that page and inserting it into a web application does not guarantee that the linkages are consistent.

    References:

    Build/Publish Single Page of Visual Studio 2013 ASP.NET Web Site

    How to publish only one (aspx) asp.net web form that has changed

    Publish only edited page in asp.net

    Regards

    Deepak

    Wednesday, January 17, 2018 7:49 AM
  • User-218090889 posted

    Publish only edited page in asp.net

    From what I got online, I understand that web application model does explicit compile and creates one dll for all.

    So it is evident that if I compile the site by using rebuild in build menu in visual studio, I can copy the application dll from bin folder of my project in my local machine to the bin folder of remote server, and then upload the updated page markup.

    Am I right?

    Wednesday, January 17, 2018 11:13 AM
  • User347430248 posted

    Hi Enzyme,

    You can do that if you are just changing the design code.

    If you are making changes in code behind then it is possible that some references get broken with other files.

    So it is not recommended for code behind changes.

    Regards

    Deepak 

    Wednesday, January 24, 2018 8:07 AM