Skip navigation.

1.x To 2.0 Migration Tip: Where did ConfigurationManager Go?All recent postsInitialize Page Titles from Site Map (Part 2)

1.x To 2.0 Migration Tip: Temporarily Disable Batch Compilation

If you’ve read through various migration HOW-TOs, you might’ve noticed a suggestion to turn off batch compilation and rebuild your project to see if any compilation errors come up. This is a very important point as the <compilation> section in web.config is a tricky one.

Here’s what an MSDN article suggests:

Open the web.config file and turn batch compilation off and re-compile that application to see if any further compilation errors might exist. This can be done by setting the batch=false attribute in the compilation tag as such: <compilation debug="true" batch="false"/>. Turning off batch compilation may expose masked compilation errors that may exist in the application but are not reported.

Important: The batch=false attribute should only be added to find such errors and then reverted once any additional compilation errors are fixed. Leaving batch=false in the compilation section has significant performance impact on build times for the application in Visual Studio 2005, so make sure you remove this attribute after doing this check.

More reading on this subject:

Comments

Comment permalink 1 Nico |
Interesting. I just found out that setting batch=false lets me start my asp.net 2.0 web app 10 times faster on my local machine! Also I dont get that annoying "no relevant source lines" error anymore when I start debugging. And if i think about it the msdn suggestion makes no sense.

Turning batch=true means that all your stuff within one directory is compiled into one dll at once. Right? Than THIS is the way to find masked compilation errors. Switching batch=false means dll's for every single page. As I mentioned, on my machine the batch=true option is very very slow. Every time when I start debugging the whole app is compiled and for every page a xml file must be generated and so on... Turning off batch compilation makes start debugging rocket fast. So I have to wonder about the suggestion above:

"Leaving batch=false in the compilation section has significant performance impact on build times for the application in Visual Studio 2005"

For me it's a real performance boost to use batch=false!

Maybe this helps other people that are very disappointed about VS2005 performance...
Comment permalink 2 Milan Negovan |
Scott Guthrie had an interesting post along these lines, too.

Emails and Notifications

Would you like to be notified when somebody responds to this post?  Would you like to have these comments emailed to you?

TrackBacks

Sorry, TrackBacks are not allowed.

Submit your comment

Please enter only text since all HTML tags except hyperlinks will be stripped. Hyperlinks will become live links. Any comments with flaming or offensive language will be deleted. Be courteous to other posters. Thank you.

Your name (required):
Your email (optional):
Your site's URL (optional):
Enter this number
Type in the number above:
Comment (required):