Click here to Skip to main content
15,888,521 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a website with huge number of pages, i keep pre-compiled version (with fixed naming) on production server.

Every time i make any change on my code i have to Publish the whole website just for a small change.

It takes about an hour to get the website published before i can deploy my changes to production server.

Is there a way to publish only a batch of pages so that the Publish process is faster?

Is there any other option to save the publishing time?

NOTE: By publishing I mean pre-compiling

Any suggestions are welcome.
Posted

HI,

Yes there is a way.
The publication process creates the dlls in 2 ways.
1. Whole web assembly will be created at once and you need to eploy the whole dlls at a time for a single page changes too.

2. Separate dlls are also created when you will select the option for the indivisual dlls. This will help you in saving the time for publication as well as deployment too. In this case you need to deploy the single dlls not the batch of dlls are required to deploy.

Thanks
 
Share this answer
 
Microsoft doesn't really have an idea of "pre-compiling" if you notice your pages have 3 components to them, the *.designer, *.aspx *.cs. The *.cs all needs to be compiled into a *.dll to be deployed to your website. Traditionally there are two types of executables, exe's and dll's. Asp.Net websites are compiled into a dll for all the code behinds that run on the server. Microsoft does not have a way to "half" compile a dll and then merge it with the other half you haven't changed.

If your website is taking that long, to compile & deploy. I would suggest you have more of an architecture problem then a code problem. Where I work our main website is 3,000,000+ lines of code, to accomplish everything the user needs to do and does. We don't take an hour to deploy. however what we have done is broken our business logic up into a number of dll's over 100 dll's and our website project in and of it self is just the aspx and the bare bones code behind to drive the flow through to our business logic. This allows us to alter x number dll's with our changes to support a new feature, We don't have to deploy all 100 dll's every time just the ones that have changed, that's the nature of dll's. if our business logic was 100% contained in our website project, then our compile, deployment would be significantly longer.

You want to consider refactoring your code into dll's. Another option if you're not married to the ASPX/ASP.NET solution is to consider an ASP/MVC.NET solution. I would consider refactoring your site. If it takes that long there's some serious issues, even if you could break Data access into a separate dll, then you wouldn't have to constantly compile & deploy the dll which handles your data access, every time you changed the website, only when you changed the Data access layer as well.

If I can be of anymore help please feel free to reach out, chris@howellsonline.ca

Cheers
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900