The inclusion of IIS Express in Visual Studio 2010 SP1 makes running a development website a lot easier, says Mike Campbell
While Visual Studio 2008 SP1 provided great features and benefits, painfully slow installation and other assorted headaches made me a bit leery about SP1 for Visual Studio 2010. Fortunately, the installation experience for Visual Studio 2010 SP1 was comparatively painless—and enabled me to finally kick Microsoft's ASP.NET Cassini sample web server to the curb in favor of IIS Express.
Installation via Web Platform Installer
Installation time for Visual Studio 2010 SP1 is going to be linked to how "large" your Visual Studio surface area is in terms of installed features and components. Consequently, you'll want to check out Jon Galloway's tips on installing Visual Studio 2010 SP1, to see if there are ways to help optimize the installation process.
Otherwise, I found that installation times for Visual Studio 2010 SP1 were much less than those for Visual Studio 2008 SP1—and in both cases I was patching "minimal" configurations with only C# and Web Dev components installed.
With Visual Studio 2010 SP1, I decided to skip the download and try the Web Platform Installer instead—because it included IIS Express rather than requiring an additional download and installation.
For me, installation took less than 20 minutes, including a reboot that was required after core Visual Studio 2010 SP1 components were installed. All in all, the process was really pretty painless and went without any hiccups or problems.
System CLR Types
One thing that did catch my eye while agreeing to terms during the installation process, though, was mention of "System CLR Types for SQL Server 2008." Because although I haven't kept as close an eye on what Visual Studio 2010 SP1 includes as I might have liked, I have kept fairly close tabs on the big components and changes.
So, when I saw something mentioning SQL Server CLR types, I was hoping that I'd somehow missed a fix that would finally allow LINQ to SQL and the Entity Framework to work with SQL Server 2008's native CLR types—such as Geography, Geometry, and Hierarchies.
Only, some quick searching on Google made me think that the inclusion of this EULA must be some sort of holdover from Visual Studio 2008 SP1 or something else, as there's no mention anywhere of SQL CLR changes to Visual Studio 2010 via SP1. In fact, the only relevant results I found that even mentioned these changes were as part of the readme for Visual Studio 2010 SP1—which, in turn, only mentions that the EULA for these components needs to be agreed to. So either this is some sort of artifact from previous installers or some goofy legalistic requirement—and not an actual fix.
That and a bit of additional thought upon the subject made me realize that fixing LINQ to SQL and the Entity Framework so that they're able to fully support Microsoft SQL Server 2008's "native" CLR data types would actually require a fix to the .NET Framework, not just to Visual Studio.
Still, you can't really blame me for hoping that maybe Microsoft would someday support their own products. But, sadly, it looks like we still have to wait. (Note, too, that even Entity Framework 4.1 doesn't include fixes for spatial data types—so, it looks like Microsoft just doesn't care.)
Of course, the real reason I couldn't wait to install Visual Studio 2010 SP1 was to kick Cassini (or whatever we're calling the "built-in" web-server that ships with Visual Studio these days) to the curb and start using IIS Express instead.
Scott Guthrie blogged about Visual Studio 2010 and IIS Express about two months ago, and covered how to get both of them working together when SP1 was still in beta. Happily, though, once you install Visual Studio 2010 SP1, getting IIS Express to work with your sites is as easy as falling off of a log.
To get it to work with one of my sites, for example, I just opened up the solution, then double-clicked the Properties folder for my MVC application in the Solution Explorer. This, in turn, brought up the property pages or dialog—where I clicked the Web tab. On this page, I instructed Visual Studio (or my project) to Use Local IIS Web server, then selected the Use IIS Express check box that's part of that option, and saved my changes. Saving my changes, in turn, prompted me to create a new Virtual Directory (which took less time to create than it did to read the dialog), but after that I was done.
The whole process was actually so easy that I had to double-check the host headers for the page launched in my browser—just to make sure that it was, indeed, being served by IIS. It was, of course, but the setup to get to this point was so painless that I really couldn't believe that it had actually worked.
And, best of all, I'm now able to run my development websites on the same web server, or platform, that I'll be hosting my sites with. Or, stated differently: Deployment of my sites just got tons easier as those ugly surprises between how things work on Cassini versus IIS are now gone—which means I'm one happier step closer to a more continually integrated development environment.
Another thing that I enjoy about IIS Express is that the icon and menu options available in the system tray are much easier to interact with and manage than those of Cassini. For starters, there's only a single icon per all running sites or instances—instead of a single icon per site. That, and you can easily manage on a per-site basis—making it easier to manage multiple sites or projects (which I do actually do on occasion).
It is worth noting, however, that if you're using Visual Studio in a shared environment, instructing your project to use IIS Express will cause problems if you're the only one on your dev team using Visual Studio 2010 SP1—as other members of your team won't be able to have Visual Studio make sense of those project instructions or properties. So just beware of that if you're sharing code or solutions with other developers.
A Good Upgrade
I've yet to really play with many other features or changes provided by Visual Studio 2010 SP1, and I haven't heard of many bad experiences from anyone who has upgraded. (I did hear of an issue with MVC Razor views that appears that it can be solved by some of the information provided in this MSDN blog—but that was a pretty advanced problem.)
Likewise, as I mentioned, I run Visual Studio with very few components or features installed, so I only had to install a total of 11 features or updates as part of the Web Platform Installer. And the bulk of the installation time spent was all on step 1—where the actual patch to Visual Studio was being implemented. After that (and a quick reboot), the rest of the installer was very speedy. My guess is that if you have lots of features and components installed, you may be looking at a much longer time than what I experienced. So make sure to plan accordingly—as I don't want to paint an overly rosy picture of installation. (I didn't have any problems with it, and it went quickly—but your mileage may vary.)
Otherwise, the installation experience was truly great in my book, and I simply could not be happier with the results. I'm looking forward to trying out the other new features and benefits of Visual Studio 2010 SP1.
Michael K. Campbell (firstname.lastname@example.org) is a contributing editor for SQL Server Magazine and a consultant with years of SQL Server DBA and developer experience. He enjoys consulting, development, and creating free videos for www.sqlservervideos.com.