ASP.NET MVC 4 breaks ASP.NET MVC 3 projects

前端 未结 4 1973
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-05 08:17

After installing the ASP.NET MVC 4 Developer Preview, I can no longer open MVC 3 projects, with the following error message:

The project type is not supporte         


        
相关标签:
4条回答
  • 2021-01-05 08:55

    I was searching for a different issue and stumbled across this question, It is similar to a few I answered and figured I would post them here:

    ModelClientValidationRule conflict

    Build Errors - 'System.Web.Mvc.ModelClientValidationRule' Conflicts

    0 讨论(0)
  • 2021-01-05 09:01

    Check the reference to System.Web.Mvc.dll file in your reference. Make sure its pointing to C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET MVC 3\Assemblies\System.Web.Mvc.dll

    If its pointing to the one under ASP.NET MVC 4 directory then open your project file in a notepad. Look for

    <Reference Include="System.Web.Mvc">
      <Private>False</Private>
    </Reference>
    

    This should be changed to

    <Reference Include="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35, processorArchitecture=MSIL" />
    
    0 讨论(0)
  • 2021-01-05 09:02

    "" If you want to update your projects to MVC4, and open them as such in the visual studio, then ""

    The solution is to change the projectType guids from

    {E53F8FEA-EAE0-44A6-8774-FFD645390401}
    

    to

    {E3E379DF-F4C6-4180-9B81-6769533ABE47}
    

    in the csproj file, after you install the mvc4 visual studio package.

    0 讨论(0)
  • 2021-01-05 09:03

    ASP.NET MVC 4 Developer Preview runs side by side with previous versions of ASP.NET MVC, however there are a few known issues to be aware of. The biggest one:

    Installing ASP.NET MVC 4 Developer Preview breaks ASP.NET MVC 3 RTM applications. ASP.NET MVC 3 applications that were created with the RTM release (not with the ASP.NET MVC 3 Tools Update release) require the following changes in order to work side-by-side with ASP.NET MVC 4 Developer Preview. Building the project without making these updates results in compilation errors.

    You'll find the solutions here.

    0 讨论(0)
提交回复
热议问题