Public Hotfix Patch for VS "Index was outside the bounds of the array" Publish Website Issue

Two weeks ago I posted about the availability of a public hotfix patch for some ASP.NET 2.0 compilation issues.  You can read about this patch in my post here.

In the comments of that post several people asked about an issue they've encountered with Visual Studio SP1 when they use the "Publish Website" command with a web project configured to use the built-in ASP.NET Development Web Server with a "/" as the virtual path (a cool technique that I previously posted a tip/trick about).

Specifically, people who have installed VS 2005 SP1 have reported encountering an "Index was outside the bounds of the array" error message during publishing:

This bug was unfortunately a regression in VS 2005 SP1.

The good news is that we have just posted a public hotfix for the issue that you can directly download here.  Omar Khan has also posted more details about the issue and patch in the WebDevTools Blog on MSDN here (which I highly recommend subscribing to).

Important: People sometimes ask me whether they should install QFE HotFixes proactively (before they ever see an issue).  I always recommend against doing this - since QFE hotfixes go through targeted testing (to verify a specific issue is fixed), and don't go through a complete product end to end sign-off.  As such, I'd recommend only applying one of if you are running into the specific issue it targets above. 

If you have any problems installing the patch or find that you still see compilation issues after you install it, you'll want to contact Microsoft product support for assistance and they'll help debug it further.  Calls to Microsoft Product Support are free if they are related to a product bug (either a QFE HotFix request or a product bug you are running into).  You can find details on how to contact Microsoft product support on this page (it allows you to lookup the local phone number to use by country).

Hope this helps,

Scott

Published Monday, April 23, 2007 11:31 PM by ScottGu

Comments

# re: Public Hotfix Patch for VS "Index was outside the bounds of the array" Publish Website Issue

Tuesday, April 24, 2007 9:28 AM by Jon Tackabury

Thanks for the heads-up!  I can't wait to take this for a test drive.  :)

# re: Public Hotfix Patch for VS "Index was outside the bounds of the array" Publish Website Issue

Tuesday, April 24, 2007 12:42 PM by Vikram

Good to know that know we at least have a fix for it

# re: Public Hotfix Patch for VS "Index was outside the bounds of the array" Publish Website Issue

Tuesday, April 24, 2007 2:13 PM by //Rutger

Hmmm... weird. The fix did not solve the problem described.

The hotfix did replace the Mswebprj.dll with version 8.0.50727.867

Anyone else still having problems after applying the patch?

# re: Public Hotfix Patch for VS "Index was outside the bounds of the array" Publish Website Issue

Wednesday, April 25, 2007 6:25 PM by Caleb

Scott,

I Installed VStudio 2005 SP1 on Vista, I Run the project, test the app, debug, when I get back to my IDE the window doesn't actually refresh, when I scroll down/up it refresh, is this some kind of bug or something?

Thanks

Caleb

# re: Public Hotfix Patch for VS "Index was outside the bounds of the array" Publish Website Issue

Thursday, April 26, 2007 2:55 AM by ScottGu

Hi Caleb,

I'm not sure why you are seeing that behavior.  If you send me email with details of it, I can loop you in with someone to investigate.

Thanks,

Scott

# re: Public Hotfix Patch for VS "Index was outside the bounds of the array" Publish Website Issue

Thursday, April 26, 2007 3:05 AM by ScottGu

Hi Rutger,

If it doesn't fix it for you, send me email and I will connect you up with someone to help.

Thanks,

Scott

# re: Public Hotfix Patch for VS "Index was outside the bounds of the array" Publish Website Issue

Thursday, May 3, 2007 10:31 PM by Cesar Vega

As soon as the trick of working on the root was posted I discovered the bug. I think I was the first one to report this to Scott publicly in that very post.

I'm glad to say: YESSSSSS! It is fixed now :)

# re: Public Hotfix Patch for VS "Index was outside the bounds of the array" Publish Website Issue

Tuesday, May 15, 2007 4:59 PM by Tim Fischer

Yup - still have the issue even after installing this fix...  What else might be the problem?

Tim

# re: Public Hotfix Patch for VS "Index was outside the bounds of the array" Publish Website Issue

Thursday, May 17, 2007 10:21 AM by Charles Hart

Applying the hotfix fixes the problem but only temporarily. I have applyed the patch twice now (about 40 minutes each time - ugh!) which fixes the problem but the next day I can't publish. Any ideas on how to work around this? I get the error regardless of what virtual path I use.

Charles

# re: Public Hotfix Patch for VS "Index was outside the bounds of the array" Publish Website Issue

Friday, May 18, 2007 2:13 AM by ScottGu

Hi Charles,

Can you send me an email with more details about the error you are seeing?  I can then loop you in with product support and they can investigate further.

Thanks,

Scott

# re: Public Hotfix Patch for VS "Index was outside the bounds of the array" Publish Website Issue

Friday, May 18, 2007 2:13 AM by ScottGu

Hi Tim,

Can you send me an email with more details about the error you are seeing?  I'll then loop in product support to have them help investigate.

Thanks,

Scott

# re: Public Hotfix Patch for VS "Index was outside the bounds of the array" Publish Website Issue

Monday, May 21, 2007 10:11 PM by Randy Glenn

Hot fix not working for me either.  Running VS 2005 SP1 on Vista.

# re: Public Hotfix Patch for VS "Index was outside the bounds of the array" Publish Website Issue

Monday, May 21, 2007 10:59 PM by RandyGlenn

Here's what I figured out.  It appears the wrong version of mswebprj.dll is installed on Vista.  According to KB933608, after the update the file version should be 8.0.50727.813 with a file date of 2/28/07, however, on Vista the file version after the update is 8.0.50727.867 with a file date of 2/22/07.  Larger file version, smaller file date...hummm.  So, I tried installing the hotfix on a Server 2003 machine and indeed, on the 2003 box, the file version and date are as they should be according the KB article, and the Publish problem was solved on that machine.  Next, I copied the correct dll to my Vista machine and shazam, the Vista machine started working correctly.  I'm guessing the Vista machine is not updating the mswebprj.dll because the old file version on that plaform is larger than one the hotfix is trying to install.  I can't confirm this because I did not notice the version of the dll on Vista before I installed the hotfix.  Hope this helps everyone.

Randy Glenn

Senior Research Specialist

The University of Tennessee

# re: Public Hotfix Patch for VS "Index was outside the bounds of the array" Publish Website Issue

Friday, May 25, 2007 3:10 PM by Dave Murdock

The link to the hotfix isn't working, Connect is saying page not found.

# re: Public Hotfix Patch for VS "Index was outside the bounds of the array" Publish Website Issue

Saturday, May 26, 2007 8:34 PM by ScottGu

Hi Dave (and others),

Please send me an email (scottgu@microsoft.com) if you are having problems downloading the patch.  I can then loop you in with someone who can help.

Thanks,

Scott

# re: Public Hotfix Patch for VS "Index was outside the bounds of the array" Publish Website Issue

Thursday, June 7, 2007 8:25 AM by Martin Beeby

Perfect, this problem was giving me major headaches.

# re: Public Hotfix Patch for VS "Index was outside the bounds of the array" Publish Website Issue

Tuesday, June 12, 2007 4:13 PM by Michael

When can we see this problem correctly resolved with a real patch and not a hot-fix?  Is it weeks a way?  Or 6-12 months away?  

# re: Public Hotfix Patch for VS "Index was outside the bounds of the array" Publish Website Issue

Sunday, June 17, 2007 4:09 PM by ScottGu

Hi Michael,

The hotfix is a real patch that you can apply immediately.  It will then be rolled into future roll-up releases of fixes - but the patch above is fully supported today and should be used if you are running into this issue.

Thanks,

Scott