从网上下载了asp.net mvc项目代码,结果打开是web application就是家在失败,错误信息为:
Microsoft Visual Studio
---------------------------
The project file 'E:\Suteki.Shop.csproj' cannot be opened.
The project type is not supported by this installation.
Microsoft Visual Studio
---------------------------
无法打开项目文件'E:\Suteki.Shop.csproj'。
此安装不支持该项目类型。
原因是asp.net mvc升级了项目模板。
打开项目文件csproj:
- <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.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{F63A91D4-3A6C-4729-BE83-D6CB45A53EF3}</ProjectGuid>
- <ProjectTypeGuids>{603c0e0b-db56-11dc-be95-000d561079b0};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>Suteki.Shop</RootNamespace>
- <AssemblyName>Suteki.Shop</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
- <MvcBuildViews>false</MvcBuildViews>
- </PropertyGroup>
把
<ProjectTypeGuids>{603c0e0b-db56-11dc-be95-000d561079b0};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
替换为:
<ProjectTypeGuids>{F85E285D-A4E0-4152-9332-AB1D724D3325};{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>