Silverlight and MVC: Thunderstorm in Paradise

Thunderstorm in ParadiseThe wind was howling, random raindrops spattered anything unsheltered like tiny shotgun pellets… and inside the office, Visual Studio 2008 would not create a Silverlight application with an MVC site to host it.

These sorts of things happen a lot.  Some miscellaneous installation or setting or patch gets installed and somehow breaks an otherwise well-tuned system.  As a developer, you just come to expect that working with new technology, one or two days out of each month will be lost to technical difficulties.

New developers tend to get frustrated when confronted with random, weird errors.  Enough to start uninstalling anything and everything like they’re paid by the byte.  I take a more pragmatic approach: why perform an appendectomy with a sledgehammer when a scalpel is indicated?

A brief aside here: my best friend, at the slightest hint of computer rebellion/slowing/impending gnome invasion by any of his computers, instigates what I like to call the “scorched rogaine” policy (he doesn’t have a lot of hair) and re-formats his computer.  It’s something that has always bugged me and at least once every 6 months reminds me of difference between a sledgehammer and a scalpel.

It didn’t help that my Silverlight SDK installation was so rocky; I was surprised Visual Studio allowed me to create any Silverlight applications at all.

I went through at least 5 installation cycles, each one having removed a separate component that I suspected was causing the problem… each time getting “FATAL ERROR DURING INSTALLATION” errors… with no description.

As it turns out, if you’re having problems installing the Silverlight Tools for Visual Studio, you have to go to Add/Remove Programs, and remove anything that references Silverlight – even the plug-in.

Dumb HappensThe installer is just not smart enough to uninstall everything on its own or patch the necessary components on top of an existing installation (even if that installation was just the browser components).

That was problem one, solved as of Friday.  Then began problem two – this morning.  While attempting to create a new Silverlight app (using the latest SDK from Silverlight.net) with an MVC shell, I received an error:

“could not be found. (Exception from HRESULT: 0×80030002 (STG_E_FILENOTFOUND))”

Followed by:

“Project Unavailable.”

Nice error, right? A Google search revealed… nothing.

After contemplating a complete re-install of Visual Studio and a re-install of each component in line to test functionality… I decided to be stubbornly pragmatic.  The whole VS2008 re-install would take up about 4 hours of productivity that I didn’t want to waste.

First I uninstalled and re-installed anything Silverlight, rebooted, and started again.

No luck.

Sticking with the stubborn, I decided that maybe MVC 1.0 RC2 (the version I was using) might be the culprit – even if RC1 and BETA were both working with Silverlight just fine.  It was off to the Microsoft MVC site to download the 1.0 release.  I guess I shouldn’t have been surprised when it refused to install because I already had the MVC 1.0 RC2 installed…

Edge of StormA quick trip back to Add/Remove programs fixed that – MVC 1.0 installed right on top.

Right about then, the clouds started to clear, and I was greeted with a surprising, but somewhat rare friend: success.

Pragmatism won out again, my best friend still didn’t have much hair, and the scalpel made some quick work and allowed me to skip over the massive patching of holes that a total uninstall of VS2008 would have led me to.

This entry was posted in Web Design and tagged , , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.