← All articles
development

ASP.NET MVC without Installing the MVC Bits

Can't open an ASP.NET MVC project without the full MVC bits installed? Strip the MVC ProjectTypeGuid from the csproj file and fix your references.

Donn Felker

Donn Felker

2009.06.16 · 1 min read · updated July 5, 2013

I was recently was helping out a collague with an ASP.NET MVC problem and I was given a link to a solution. I opened it and got this message:

image

Which ends up giving you the following in the solution explorer.

image

The reason I’m getting this is because I never installed the ASP.NET MVC bits, well, actually that’s a lie. I have them, but I never installed the full ASP.NET MVC package. I unzipped the MSI with the following command prompt:

#> msiexec –a PathToMsi.msi

This will drop the MSI contents your output to your C:\ drive. Here’s the help window for the msiexec (app click for larger):

image

If you’re like me, and have the bits local, then this can be a pain. Again, the underlying reason is I did not install the MSI which contains a project template which this project is using. Its actually using a particular ProjectTypeGuid in the csproj file. This guid is:

603c0e0b-db56-11dc-be95-000d561079b0

This tells Visual Studio that this project is an ASP.NET MVC file. To open this project in Visual Studio, remove this guid.

Change the project file from this:

{603c0e0b-db56-11dc-be95-000d561079b0};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}

…to this…

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

Now re-open and you’ll see the project loaded successfully.

image

The only thing you’ll have to do is fix your references in your project as they will probably be broken. Point the references back to the ASP.NET MVC binaries stored locally on your machine.

Donn Felker

Written by Donn Felker

I've spent 25+ years shipping software, writing books, and running my own companies. I write about thinking clearly, working for yourself, and doing real work while AI rewrites the rules. New essays land here every week.

Get the newsletter

Keep reading