Updating a precompiled site without re-publishing everything

Rate It (2)

Last post 06-12-2009 11:53 PM by Spider Master. 2 replies.

Sort Posts:

  • Updating a precompiled site without re-publishing everything

    06-11-2009, 1:37 PM
    • Member
      117 point Member
    • Premy
    • Member since 01-23-2009, 7:43 PM
    • Belém, Brazil
    • Posts 99

    After I successfully pre-compiled and published my site, I was faced with the inevitable problem of doing minor updates/corrections. The general consensus seems to edit the original file, pre-compile the site again, then publish the whole site again. Well I seem to have found a way that eliminates the need to publish the whole site again. Here's what I do:

    I edit the original file or files, then I click BUILD>PUBLISH WEB SITE, so the site is pre-compiled again. In fact it would be ideal to be able to pre-compile just the edited files again, but that doesn't seem possible, at least not with VS2008. The only option I have checked in the PUBLISH WEB SITE dialog is "Use Fixed Naming and Single Page Assemblies". I get prompted after a while that the previous (local) pre-compiled site will be deleted (and replaced by the current version); I click OK of course. Then I open my local pre-compiled site, which now holds the new version. Now I do WEBSITE>COPY WEB SITE, which gets me the window with my local site on the left and the remote on the right (after I establish the ftp connection).

    From here on, one would normally transfer all the files from local to remote again (overwriting remote) but what I do is look in local for the edited aspx page(s), which I then transfer to remote (overwriting). Then I go to the bin folder, which has 2 additional files for each aspx file: one ending in .dll and one ending in .compiled. So I also transfer the corresponding .dll and .compiled files for each aspx to the remote bin folder, and that's it.

    I think one can even skip transferring the aspx (transferring only the .dll and .compiled), but I transfer it just the same. If u edit a master page or an ascx then u will only have the the .dll and .compiled to transfer. If u edit a biz object (app_code) then u will have to transfer App_Code.dll and App_Code.compiled (bin folder). Other stuff like images, zip files and so on can be directly updated of course, since they do not get pre-compiled at all.

    I also changed the connectionstring in my original site's webconfig to point to to the remote db (so no more App_Data access). This way I can still locally test my site, and see my db in server explorer. Changes made to tables, sprocs, triggers, etc. in server explorer are now updated directly on the remote db (no need to start up SQL Management Studio).

     The above has been working fine for me, till now. I don't know if there are any gotchas or caveats to go with it, but up to now I have been able to save some time by not re-publishing everything again.

    Maybe this might come in handy for some of u guys too.

    Premy

  • Re: Updating a precompiled site without re-publishing everything

    06-12-2009, 3:07 PM
    • Star
      10,720 point Star
    • chintanpshah
    • Member since 11-19-2008, 5:39 AM
    • Ahmedabad
    • Posts 1,905

    Use:

    Web Deployment Project 2005 for VS 2005 and

    Web Deployment Project 2008 for VS 2008

    This will generated single DLL for whole project.

    Hope this helps...

    Don't forget to mark as answer, if it helps
  • Re: Updating a precompiled site without re-publishing everything

    06-12-2009, 11:53 PM
    • Participant
      1,580 point Participant
    • Spider Master
    • Member since 10-16-2007, 1:32 PM
    • New Zealand
    • Posts 452

    chintanpshah:

    Use:

    Web Deployment Project 2005 for VS 2005 and

    Web Deployment Project 2008 for VS 2008

    This will generated single DLL for whole project.

    I fully agree.

    For over a year I wasted my time working on "Web Site" projects in VS and decided to move one of my larger sites to a "Web Application" project, There were alot of problems in doing this but got there in the end and it paid off.

    During the upgrade I decided that my sites also use a common library for there operation So I have also put alot of the old App_Code into re-usable Library's making updating all the sites a breeze allowing me to only need to update 1 library and then update the bin folder for each site. The Library's work in the same way as .net framework library or Ajax control tool kit.

    You are probably thinking what about the aspx pages!! My library also contains the data for the aspx files. Meaning that once I have performed an update (the bin folder contents) the library's actually contain the aspx file information and the update is immediate. I hope that makes sense, an example would be Default.aspx. This page is actually empty with only an <%@ Page %>

    I'm pretty sure for Web Applications you can set them to compile the aspx page as well but don't quote me lol. This would leave you with only needing to update your DLL's (Dynamic Link Library's)

    Anyway I just wanted to let you know that there are heaps of ways to maintain ya sites and this was the better solution for us. Stat wise, Over the last 6 months we have produced and maintained twice as much as the 12months prior. This would mean we have increased productivity 4x.

     

    Anyways good luck Big Smile

     

     

     

     

    Trading Center is a New Classifieds Starter Kit on Code Plex.

    "If Your Question Has Been Answered, Please Mark It As the Answer"

Page 1 of 1 (3 items)