Troubleshooting the MVC installer for Visual Studio 2010 Beta 1

Today, MVC for Visual Studio 2010 Beta 1 was announced. You can find more details about it on Phil’s post. For the better part of the last month I’ve done little except churn out new installers for MVC, so I’m really happy to finally see one of them going out the door instead of heading to my recycle bin. The first thing you will probably notice when running the new installer, apart from the version number being 1.1, is that it is now a self-extracting EXE as opposed to just being a single MSI.

This change came about as we started to integrate MVC into the setup code of Visual Studio 2010. Including MVC required us to make changes to our own setup code and as a result we ended up with two MSIs; one for the runtime and another for the tooling components. This solved the problem of including MVC in post Beta 1 versions, but we still had to provide an out of band (OOB) installer for Beta 1 while keeping the CTP releases for the next version of MVC in our sights as well.

Chaining two MSIs so that the first installer calls msiexec to install the second is impossible because Windows Installer prohibits running installs in parallel (at least on versions prior to 4.5). We examined various options to provide a simple user experience for installing the two MSIs on Beta1. Downloading separate MSIs was never really an option because as we start making CTP releases of the next version we don’t want users to end up with the runtime component of one preview and the tooling component of another release.

The first attempt produced a chained installer (bootstrapper) using the setupbld.exe utility provided by WiX 3.0. It works really well, but did not quite fit our needs. For those of you that are using WiX to author setup programs, the roadmap for version 3.5 includes a new utility called Burn that will provide rich functionality for creating chained setup programs. Even though we ended up throwing this installer away it did have some benefits and we upgraded our build scripts to the latest version of WiX.

Attempt number two saw the creation of a the self-extracting EXE using the GenerateBootstrapper task and relies on some of the ClickOnce functionality used to describe the products and packages that comprise the installation manifest. To keep things simple, our EXE does not download the individual MSIs from a server. Instead, we just included them within the EXE.

I could have completed the second installer much sooner. In December when we were wrapping up RC1 we began looking at servicing scenarios for MVC using Windows Update (WU) and Microsoft Update (MU). As part of the investigation I split the MSI and created a self-extracting EXE. Eventually the effort was abandoned since we felt confident that we could service MVC by releasing a patch should the need arise and it was a better fit for MVC’s OOBness. I packed the code away just in case something changed for RTM, but soon after 1.0 was released I deleted it to get my machine cleaned out in preparation for the next version of MVC (note to self: Never throw away code).

Because our installation methodology has changed, troubleshooting failed installations is slightly different compared to MVC 1.0, but I hope to provide some useful tips on where to find information when things do go wrong.

What does the new installer do?

When you run AspNetMVC1.1_VS2010.exe it will extract a number of files to a randomly named folder under %temp% (usually located at AppData\Local\Temp). In my case the files were extracted to AppData\Local\Temp\VSDC164.tmp\. Within this folder you will find subfolders that are created for each MSI in the bootstrapper’s manifest. The following files should be present in either the root folder or one of the subfolders:

  • AspNetMVC1.1.msi
  • VS2010ToolsMVC1.1.msi
  • Setup.exe
  • Eula.rtf

Once the files are extracted, Setup.exe simply installs each MSI sequentially by calling msiexec using the /i and /q options.

Crash, Boom, Bang

When the EXE fails you should see a dialog similar to the one below. Note that I expanded the Details section (and sanitized some information).

bootstraperror

Take note of the log file being mentioned at the bottom of the dialog. This file is generated by the bootstrapper, not msiexec. The file is not too interesting, but does tell a sad tale about how msiexec is invoked:

Installing using command 'C:\Windows\SysWOW64\msiexec.exe' and parameters ' -I "C:\Users\*\AppData\Local\Temp\VSDC164.tmp\MvcRuntime\AspNetMVC1.1.msi" -q '

As you can see, the EXE simply performs a silent install and does not create a verbose log file. The default MSI log file generated by the bootstrapper contains very little information. In fact, if the install fails, you probably won’t see more than the excerpt below. This error was induced by running an unsigned installer on Windows Server 2008 and the installation failed when it tried to run NGEN on the unsigned System.Web.Mvc assembly.

Error 1937. An error occurred during the installation of assembly 'System.Web.Mvc,version="1.1.0.0",culture="neutral",publicKeyToken="31BF3856AD364E35",processorArchitecture="MSIL"'. The signature or catalog could not be verified or is not valid. HRESULT: 0x80131045. assembly interface: IAssemblyCacheItem, function: Commit, component: {32E5FFC3-0CDC-43C1-A5F8-62CAF64F3064}
=== Logging stopped: 6/5/2009  10:03:51 ===

Can you get more verbose logs? Yes. To do that, simply add the entry below to your registry and run the EXE again. For more details on the various options you can consult this KB article.

Key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Installer

Value Name: Logging

Type: REG_SZ

Data: voicewarmupx

The MSI log file that’s produced by this registry entry is extremely verbose. Remember to remove the registry entry when you are done because Windows will continue to produce log files whenever you install a product and this may impact on install times for large products. One drawback of using this approach to create log files is that you end up with a totally random file name. For example, when I ran the EXE, the log that was produced was located in AppData\Local\Temp\MSI4ced1.LOG. The easiest way to find the log is to look at the timestamps of the files. For the more adventurous amongst us, delete all the MSI*.LOG files in %temp% before running the setup program.

Analyzing Install Logs

The Windows Installer 4.5 SDK provides a utility, wilogutl.exe, that can be used to analyze install logs. Simply launch the EXE, open the log file and click on the Analyze button. It won’t always solve your installation problems, but it’s always good to have another tool at the ready to troubleshoot problems. If nothing else, the tool can assist you to quickly step through a log and identify all the points of failure. The utility provided the following feedback for the log file from my failed installation.

wilogutl

Ultima Ratio

There is one final option available to troubleshoot a failed installation. Recall that when run, the EXE first extracts all the MSI files to your %temp% folder. Simply install the MSIs separately; runtime first, then the tooling components. Although this will not make any failures disappear, it should make it easier for you to determine which component (runtime or tools) is responsible for the installation failure.

Known Issues and Improvements

As much as I hate to admit it, there are some problems with the installer. While testing the installer it was discovered that even if you don’t have Visual Studio installed you will still get an entry under ARP for Microsoft Visual Studio 2010 Tools for ASP.NET MVC 1.1. The reason for this is that the bootstrapper does not check whether Visual Studio is installed. The MSI on the other hand does perform this check. However, when the MSI fails to detect a valid version of Visual Studio, it only disables some features inside the MSI, hence the entry under ARP still appears because the MSI does complete. Kudos to our testers for discovering this. We have a fix ready to address the problem, but schedules prohibited it from going into the build we released.

Noticed the double “Setup” in the error dialog I showed earlier? I’ve rewarded myself by opening a bug just for this.

I’m also not too happy about requiring users to tweak the registry to get verbose setup logs. Suffice it to say that I am looking at ways to introduce a static location, or at the very least a static log filename, so that users will not need to fiddle with the registry in upcoming CTP releases of MVC. My initial investigation seems to indicate that we might run into OS dependencies for this, but let’s see what can be done.

Have fun with the installer and let us know if you run into problems.

Comments

# re: Troubleshooting the MVC installer for Visual Studio 2010 Beta 1

Thursday, June 11, 2009 10:09 PM by Jesse

I cannot uninstall the mvc 1.1 component. I wanted to downgrade my visual studio team edition to professional. Unfortunately something went wrong, I cannot install visual studio 2010 now, nor can I remove mvc 1.1. What do I do beside reinstall windows?

# re: Troubleshooting the MVC installer for Visual Studio 2010 Beta 1

Thursday, June 11, 2009 11:04 PM by jeloff

@Jesse

What sort of error are you receiving when you try to uninstall MVC. MVC 1.1 creates two entries under ARP. You first need to uninstall Microsoft Visual Studio 2010 Tools for MVC 1.1, then uninstall ASP.NET MVC 1.1 (this is the runtime component).

# re: Troubleshooting the MVC installer for Visual Studio 2010 Beta 1

Monday, June 15, 2009 3:58 PM by Micheal Howard

Installed succesfully on Windows Server Ent 2008 R2 and VS 2010 Beta 1. First time.

# re: Troubleshooting the MVC installer for Visual Studio 2010 Beta 1

Monday, June 15, 2009 4:07 PM by jeloff

@Micheal

Awesome. Let me know if you encounter any issues.

# re: Troubleshooting the MVC installer for Visual Studio 2010 Beta 1

Tuesday, June 30, 2009 1:26 AM by Matt

Any tips for getting it to install on Win7RC AMD64?  I get no failure message, and there's nothing obvious in the Installer logs.

# re: Troubleshooting the MVC installer for Visual Studio 2010 Beta 1

Tuesday, June 30, 2009 1:35 AM by Matt

Re: my above comment.  I actually think it succeeded.  I expected to get a dialog box saying the installation completed.  I never got one, but it appears to work.

# re: Troubleshooting the MVC installer for Visual Studio 2010 Beta 1

Tuesday, June 30, 2009 2:08 AM by jeloff

@Matt

Yes, that's something we're working on. The UI that the installer had in 1.0 is suppressed, but we're hoping to update the bootstrapper to include a dialog similar to the final dialog we used in 1.0. Great to hear it's running on Win7 RC. If you ever run into something that looks like a silent failure then take a look at Add/Remove Programs first.

# re: Troubleshooting the MVC installer for Visual Studio 2010 Beta 1

Saturday, July 25, 2009 8:05 AM by Marius

I have installed it successfully, but where are the templates of MVC projects because I can't find them...

# re: Troubleshooting the MVC installer for Visual Studio 2010 Beta 1

Monday, July 27, 2009 12:24 PM by jeloff

@Marius

Hi Marius

The templates install to exactly the same folders under Dev10 as they do under 2008. If VS is open during MVC's installation, then it may result in problems. Are you just not seeing the templates when you try to create a new project?

# re: Troubleshooting the MVC installer for Visual Studio 2010 Beta 1

Wednesday, August 19, 2009 1:56 PM by Sekhar

Oh my god. Please help me with this installation. I am unable to install the tools on VS 2010 beta1 / windows 7 RTM

It worked great on windows 7 RC. Not sure why it doesnt work now

# re: Troubleshooting the MVC installer for Visual Studio 2010 Beta 1

Wednesday, August 19, 2009 6:42 PM by jeloff

@Sekhar

Do you have an install log for the tools installation?

# re: Troubleshooting the MVC installer for Visual Studio 2010 Beta 1

Thursday, October 22, 2009 4:36 PM by Yarx

Any idea why MVC 1.1 would refise to uninstall. It claims I have to uninstall the tools component, but I have done that, and it stills claims I have to do that step first. the log from the failed uninstall is useless since this is all it states

Please uninstall the Microsoft Visual Studio Tools component for MVC before uninstalling Microsoft ASP.NET MVC 1.1.

=== Logging stopped: 10/22/2009  14:11:16 ===

I've re-installed both the runtime and the tools, uninstalled the tools and still can't uninstall the runtime? Any ideas?

# re: Troubleshooting the MVC installer for Visual Studio 2010 Beta 1

Thursday, October 22, 2009 5:03 PM by jeloff

@Yarx

Try deleting HKLM\SOFTWARE\Microsoft\ASP.NET\MVCTools 1.1 from the registry. Then uninstall tools followed by runtime.

# re: Troubleshooting the MVC installer for Visual Studio 2010 Beta 1

Friday, October 23, 2009 6:08 PM by Marcus

@Yarx

If you're running Win7 x64 (as I am), then you need to remove the key "HKLM\SOFTWARE\Wow6432Node\Microsoft\ASP.NET\MVCTools 1.1". Seems like the uninstaller doesn't do this on x64 installations.

# re: Troubleshooting the MVC installer for Visual Studio 2010 Beta 1

Wednesday, June 1, 2011 6:42 AM by weblogs.asp.net

Troubleshooting the mvc installer for visual studio 2010 beta 1.. Peachy :)

# re: Troubleshooting the MVC installer for Visual Studio 2010 Beta 1

Wednesday, August 15, 2012 11:49 AM by Parham

Its like you read my mind! You appear to know so much about

this, like you wrote the book in it or something. I think that you can do with

some pics to drive the message home a bit, but instead of that, this is wonderful blog.

A great read. I will definitely be back.

# re: Troubleshooting the MVC installer for Visual Studio 2010 Beta 1

Monday, September 3, 2012 9:45 PM by Rick

Really enjoyed this article.Much thanks again. Awesome.

# re: Troubleshooting the MVC installer for Visual Studio 2010 Beta 1

Saturday, September 8, 2012 11:30 AM by cash

I am so grateful for your blog post.Thanks Again. Will read on...

# re: Troubleshooting the MVC installer for Visual Studio 2010 Beta 1

Saturday, September 29, 2012 6:36 PM by Krueger

Hello to every one, the contents existing at this website are really awesome

for people experience, well, keep up the good

work fellows.

# re: Troubleshooting the MVC installer for Visual Studio 2010 Beta 1

Friday, October 26, 2012 5:43 PM by Beaman

Very shortly this site will be famous among all blogging visitors, due to it's pleasant articles or reviews

# re: Troubleshooting the MVC installer for Visual Studio 2010 Beta 1

Monday, November 12, 2012 1:54 PM by Shumaker

Wonderful, what a blog it is! This website provides helpful data to us, keep it up.

# re: Troubleshooting the MVC installer for Visual Studio 2010 Beta 1

Sunday, November 18, 2012 6:06 AM by Tirado

Hi there, the whole thing is going perfectly here and ofcourse every one is sharing data, that's actually fine, keep up writing.

# re: Troubleshooting the MVC installer for Visual Studio 2010 Beta 1

Wednesday, November 28, 2012 9:51 AM by Rinehart

I don't even know how I ended up here, but I thought this post was great. I do not know who you are but definitely you're going to a famous blogger if you are not already ;

) Cheers!

# re: Troubleshooting the MVC installer for Visual Studio 2010 Beta 1

Tuesday, December 4, 2012 4:34 PM by Wagoner

Good day! I just would like to offer you a huge thumbs up for the excellent info you have right here on this post.

I'll be coming back to your blog for more soon.

# re: Troubleshooting the MVC installer for Visual Studio 2010 Beta 1

Sunday, January 20, 2013 4:39 PM by Runyan

The Oscar winner felt sure she was missing out on movie roles at the beginning of her

career because she didn't stand out at auditions - and she was tired of blending in with other Hollywood hopefuls. She tells People magazine, "I would go on acting auditions, and every black girl would have this long, curly hair, whether it was real or not. And I would go to these auditions and come back with nothing. So I had to somehow be different."

# re: Troubleshooting the MVC installer for Visual Studio 2010 Beta 1

Tuesday, March 26, 2013 4:49 AM by Barrows

This design is incredible! You definitely know

how to keep a reader amused. Between your wit and your videos,

I was almost moved to start my own blog (well, almost...HaHa!

) Wonderful job. I really loved what you had to say,

and more than that, how you presented it. Too cool!

# re: Troubleshooting the MVC installer for Visual Studio 2010 Beta 1

Tuesday, April 16, 2013 12:11 AM by Winfield

It's a pity you don't have a donate button! I'd most certainly donate to this brilliant blog! I suppose for now i'll settle for book-marking and adding your RSS feed to my Google account.

I look forward to brand new updates and will share this website with my Facebook group.

Talk soon!

# re: Troubleshooting the MVC installer for Visual Studio 2010 Beta 1

Friday, April 19, 2013 3:22 PM by Chaney

This principle is called thematic approach and is being utilized by a number of schools and learning

center for young children. The same parents that parented the cheerful children are

now required to parent the defiant child. Dr Phil in his effective parenting survey of 17,000 people found that the two

top challenges facing parents were making punishment

work and improving school performance.

# re: Troubleshooting the MVC installer for Visual Studio 2010 Beta 1

Saturday, April 20, 2013 4:10 PM by Maness

With the higher desire of non-public label appropriate Word -

Press themes, you can create a respectable measurement membership foundation of customers just itching to shell out you money for substantial top quality themes

that they can rebrand themselves. You could opt to

buy such articles and re-distribute them or sell them online.

Simply put, these are pre-written articles that are available for public acquisition.

# re: Troubleshooting the MVC installer for Visual Studio 2010 Beta 1

Wednesday, April 24, 2013 7:22 AM by Ritchie

This is my first time pay a quick visit at here and i

am actually happy to read all at single place.

# re: Troubleshooting the MVC installer for Visual Studio 2010 Beta 1

Friday, April 26, 2013 5:01 AM by Welker

Quality posts is the crucial to attract the visitors to pay a quick visit the web page, that's what this site is providing.

# re: Troubleshooting the MVC installer for Visual Studio 2010 Beta 1

Sunday, May 26, 2013 4:05 AM by Michaud

Parents who are authoritarian also believe that their

word is law and do not tolerate disagreement.

The same parents that parented the cheerful children are now required to parent

the defiant child. Parents are encouraged to start preparing students before the senior year

in high school.

# re: Troubleshooting the MVC installer for Visual Studio 2010 Beta 1

Tuesday, May 28, 2013 4:32 PM by Logsdon

From quality groundworks in Cheshire to patios in Cheshire, they can do it all.

The contemporary architecture into unity with the landscape itself, variety of species in plantings is frequently replaced with geometry as a means of mirroring

the structural features of buildings. All it takes is a little

bit of thought and creativity, plus a trip or two to browse some

of the materials available at your local garden center, and you'll soon be bursting with your own unique landscape edging ideas.

# re: Troubleshooting the MVC installer for Visual Studio 2010 Beta 1

Thursday, May 30, 2013 6:37 AM by Cooke

You might want to go out on test drives and this can help

you to find out what your triggers are. Some people believe that the chance of utilizing

an IRS tax attorney signifies utilizing underhand way of resolving

their tax debt difficulties. Some individuals may think that coffee and smoking

assist them unwind.

# re: Troubleshooting the MVC installer for Visual Studio 2010 Beta 1

Thursday, May 30, 2013 11:38 AM by Cooke

You might want to go out on test drives and this can help

you to find out what your triggers are. Some people believe that the chance of utilizing

an IRS tax attorney signifies utilizing underhand way of resolving

their tax debt difficulties. Some individuals may think that coffee and smoking

assist them unwind.