Last post Jun 01, 2006 02:40 PM by rjpaulsen
Mar 13, 2006 02:45 AM|Cine|LINK
I need some help :(
After we converted from vs2002 to vs2005, the buildtime of our project has gone from ~1 min to ~8 min. The libraries we build are not the problem, they all seem to build much faster infact, however the web-project compiles extremely slow.
I have tried to enable diagostic output from the compilation, but apparently this is not supported by webprojects, because there is no change in the output.
Mem usage of devenv.exe rises from about 80mb on a clean project to about 200 after compile is done. Performance monitor shows it is using 25% CPU during the whole build, and doing lots and lots of IO ?!? I thought csc.exe would do all the IO, but for the
trace I ran, devenv.exe did a total of 1mb/sec for 8min 20sec = 500MB... The project is about 80mb uncompiled...
\Process(devenv)\% Processor Time"
\Process(devenv)\IO Data Bytes/sec"
Mar 14, 2006 10:07 AM|ScottGu|LINK
Can you provide some more details regarding your web project structure (number of files, languages used, etc).
Also -- I assume you ported using the built-in VS 2005 Web Site Model. Have you looked at all at the VS 2005 Web Application Project option (http://webproject.scottgu.com). This provides a build environment similar
to VS 2003, and actually compiles much faster than web-sites by default (the reason being that web-sites provide more validation -- which is good, but can also slow down build times). The VS 2005 Web Application option is currently in preview, but will be
feature-complete in about two weeks (I can get you access to a recent build of it if you want to email me directly at:
firstname.lastname@example.org). Upgrading to a web application project should only take a short while, and will give you build speeds that are usually a little less than 2003.
Hope this helps,
Mar 16, 2006 05:00 AM|Cine|LINK
Mar 16, 2006 10:05 AM|nicolajb|LINK
I have kind of the same problem. I am using a Web Deployment Project to precompile my website, but it takes forever.
If I make a small correction in a code behind file (or in any file) the deployment tool still starts the deployment by erasing all the old files and then rebuilds the web site again. I like the deployment tool a lot and think it's better than just building
or publishing the website directly, but I'd like it to be faster (just to update the needed files).
Any way to force this behaviour?
Will there btw be any way to convert a web site project into a web application project?
Thx a lot
Mar 16, 2006 08:47 PM|ScottGu|LINK
You should make sure that you only have the web deployment project configured to run while in "Release" configurations in VS, and then just do a normal web-site build while in debug mode. That way you only incur the cost of doing a full build when you are
ready to publish a site -- and not when only making changes. You can pull up the configuration manager and configure which projects to build (or not build) depending on the release configuration.
Mar 16, 2006 08:50 PM|ScottGu|LINK
Given the size of your project and its structure I'd actually probably recommend using a VS 2005 Web Application for normal development, and then optionally add a web deployment project for publishing. This will give you the fast build-time you had before,
and then when you publish it will do the additional verification for you that your .aspx markup is all correct. I think this would be the best of both worlds.
If you want to send me email directly (email@example.com), I can give you access to a more recent Web Application Project drop (note: the feature complete version will be out in about 2 weeks). This will make
migration very easy, and give you the build-times that you are looking for.
Mar 16, 2006 08:51 PM|ScottGu|LINK
BTW -- there will be a coversion tool to take an existing web site project and migrate it to a web application project, so that can be done relatively straight-forward if you want.
Mar 17, 2006 01:35 AM|nicolajb|LINK
Thanks for your answers. I’ll definitely take a look at the web application project when it ships in 2 weeks.
About the deployment… I have made solution configurations for both developing and deploying so the deployment project will only build at deployment time. We have
2 large websites (each 500+ pages) witch on some days will be updated several times. I still think it is frustrating that the whole pre-compiled site will be build every time when only a few pages have changed….
Mar 21, 2006 11:39 AM|Cine|LINK
Mar 29, 2006 06:48 PM|rjpaulsen|LINK
We too are having extremely slow build times. We have 3 projects:
1 Web Project
1 Class Library
1 Web Form
We have the following files:
523 .cs Files
83 .ascx Files
222 .ascx Files
* Pressing F5 takes 3min, 25sec before the default aspx pops up (Every time we make a code change).
* This was a VS2003 solution converted to VS2005 using the updated Conversion Wizard.
* The web project is running under IIS on WinXP
* Machine is a brand new install w/ all the updates/patches/etc
* 3Ghz, 2gig ram.
At this point I'd be happy with decent build times, but while I'm at it:
Right-Clicking on a small class (only a hand-full of properties), choosing "Class Diagram", then adding a new Field causes VS2005 to 'Prepare' every document in every project. After several min, VS2005 just 'goes away' -- as in I have to start it up again.
I will try this alternate web project and see if that helps enough so we can use Vs2005; I'm just itch'n to use it!
Mar 30, 2006 01:35 AM|ScottGu|LINK
If you can send me email directly (firstname.lastname@example.org) I can send you the latest build of the VS 2005 Web Application Project (it is now feature complete and will be posted on the web early next week). This
will allow you to easily upgrade your web project and give you very fast build times.
May 18, 2006 11:30 PM|Tzu-Yie|LINK
Could you please briefly explain why Web Application Project will compile faster for a large web application like the one here, and why the ASP.NET 2.0 original web site method is not a good one? And, if so, why ASP .NET 2.0 shipp with web site method?
My web application has the same problem since we developed from VS 2005 Beta 2 (now we used VS 2005 RTM). We also used TFS to control the source codes. I'll try to use web application project, but I want to know the reasons.
May 19, 2006 10:15 AM|rjpaulsen|LINK
Using the Web Application Project gives you two code-behinds for each aspx/ascx. The second code behind, named "*.aspx.designer.cs", contains the declarations for the form controls. In the Default VS2005 project model these files are dynamically created
at build/run time, but not persisted to disk.
It is my understanding that the gain in speed comes from storing the control declarations on disk instead of dynamically creating them.
If I had to guess, the only reason the default project type even exists is for the free-version of VS. It would be a good way to give a decent way to build small websites, force an upgrade for any decent-sized project. (Perhaps Web Application Projects work
on the free version, I don't know).
I feel it was a mistake to ship VS2005 w/o Web Application Projects. Out of the box VS2005 basically doesn't work with enterprise-level websites. We expect MS to 'think bigger' then we do and give us the tools to grow into, not something that holds us back.
This is exactly what we thought was happening with VS2005. Is WAP didn't come out the day it did, we would have given up our VS2005 upgrade plans.
Currently, We are very happy with VS2005 + Web Application Project. It finally feels like an upgrade and does make development a better experiance.
Now they can focus on [hopefully] fixing the Sql2005 client tools. :-)
Jun 01, 2006 04:57 AM|Koob|LINK
Thanks, it makes things a little more clear.
But: Earlier in this post ScottGu said: ..."the reason being that web-sites provide more validation "... and Cline said: "We are indeed using the new 2005 web site model, and one of the main reasons for actually switching is the added checks on the pages"...
Does anyone have any references to more info about the differences?
Jun 01, 2006 02:40 PM|rjpaulsen|LINK
I believe the 'Validation' that occurs in the Web Site projects validates controls on your .aspx have a valid object in the code-behind (and visa-versa).
In .net 1.1 you could reference a control on the .aspx that didn't acutally exist (There is a protected Textbox Textbox1; in the code behind, but no Textbox1 on the .aspx). It also validates the .aspx itself making sure all your control tags are happy. I
think "validation" only involves the .aspx files.
I did so little work with Web Site projects that I'm not sure what else the "validation" does.
My suggestion is to do what we did: Switch to Web Application Projects, forget about Web Site Projects and enjoy the goodness of VS2005.