Saturday, January 3, 2009

Opening a VS 2008 SP1 Web Application in VS 2008 without SP1

At my employer, we have Visual Studio 2008 rolled out to the general populace. Unfortunately, we do not have VS 2008 SP1 installed with it. I know it should be coming in the next month but I want to mention a little trick that I have been using for a few months now just in case someone needs it. In this example, I am trying to open a VSLiveBlog project that Ben Scheirman has posted here.

When I first open the solution I get this message:

image


I hit the ‘OK’ button and am left with all the projects open except the web application:

image


Right-clicking in the unavailable project with give me the following menu:

image


Selecting the “Edit VSLiveBlog.Web.csproj” will open up the project file XML. I see the following:

<Project ToolsVersion="3.5" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.21022</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{766F7651-6588-4B2D-A79D-CA0195A1B6DD}</ProjectGuid>
<ProjectTypeGuids>{603c0e0b-db56-11dc-be95-000d561079b0};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>

I then switch the <ProjectTypeGuids> section to a functioning one from another project on my machine:

<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>

Save and close the csproj file and right click on the unavailable project again, this time selecting “Reload Project”:

image


Time to get to work:

image

0 comments: