VS2013 Open VS2010 cannot find the application that this project type is based on MVC2 upgrade MVC5 cannot load Web project

Source: Internet
Author: User
Tags jquery library

Upgrading an ASP 2 Project to ASP 3 Tools Update

ASP. NET MVC 3 can be installed side by side with ASP. 2 on the same computer, which gives you flexibility in Choosi ng when to upgrade an ASP 2 application to ASP 3.
ASP. NET MVC 3 can be used with ASP.
MVC 2 is installed on the same PC at the same time, giving you the flexibility to choose when to upgrade ASP. NET MVC 2 applications to ASP.
MVC version 3.

To manually upgrade an existing ASP 2 application to version 3, do the following: To manually upgrade the version, do the following

  1. Create a new empty ASP. NET MVC 3 project on your computer. This project contains some files that you must have to upgrade.
  2. From the following ASP.
    The files in the MVC 3 project are copied to the appropriate location in your ASP. NET MVC 2 Project . you need to change all references to the JQuery library to accommodate the new file name (jquery-1.5.1.js)
    • /views/web.config
    • /packages.config
    • /scripts/*.js
    • /content/themes/*.*
  3. Copy the Packages folder of an empty ASP. NET MVC 3 project into your own solution root catalog (the directory where the. sln file resides)
  4. Copy all files under MVC2 project \ Bin to the Packages folder.
  5. If your ASP. NET MVC 2 project contains other zones, copy the/views/web.config file to the Views folder directory of all regions
  6. Find the following:
    system. Web. Mvc, version=2.00.0             

    Replace it with the following:   make the following changes

    system. Web. Mvc, version=3.00.0             
  7. web.config file under the root of the application, add the following settings to  assemblies  section
    <addassembly="System.Web.WebPages, version=1.0.0.0, Culture=neutral, publickeytoken= 31bf3856ad364e35 "/><addassembly=" System.Web.Helpers, version=1.0.0.0, culture= Neutral, publickeytoken=31bf3856ad364e35 "/>        
  8. Remove the reference to SYSTEM.WEB.MVC (to the dynamic-link library for version 2) in Solution Explorer, and then add a reference to SYSTEM.WEB.MVC (version 3)
  9. add a reference to System.Web.WebPages.dll and System.Web.Helpers.dll in Web. config. These assemblies are located in the following folder:
    • %programfiles%\ Microsoft asp.net\asp.net MVC 3\assemblies
    • %programfiles%\ Microsoft asp.net\asp.net Web pages\v1.0\assemblies
    1. A third-party library compiled under the MVC 2 framework that adds the following highlighted BindingRedirect element under the configuration section of the Web. config file
      <runtime><assemblybinding xmlns="Urn:schemas-microsoft-com:asm.v1"><dependentAssembly> <assemblyidentity name=  "SYSTEM.WEB.MVC"             Publickeytoken= "31bf3856ad364e35" /><bindingredirect oldversion< Span class= "pun" >= "1.0.0.0-2.0.0.0"  newversion = "3.0.0.0" />     </dependentassembly>   </assemblybinding> </RUNTIME>           
    2. <runtime>
      <assemblybinding xmlns= "Urn:schemas-microsoft-com:asm.v1" >
      <dependentAssembly>
      <assemblyidentity name= "SYSTEM.WEB.MVC" publickeytoken= "31bf3856ad364e35"/>
      <bindingredirect oldversion= "1.0.0.0-5.0.0.0" newversion= "5.0.0.0"/>
      </dependentAssembly>
      </assemblyBinding>
      </runtime>

  10. Edit the project name of the Web project. csproj This file finds the projecttypeguids tag,
    and replace {f85e285d-a4e0-4152-9332-ab1d724d3325} with {e53f8fea-eae0-44a6-8774-ffd645390401}
  11. Compare the. csproj files under the. csproj and MVC2 Web projects under the MVC5 Web project to modify the possible differences
  12. Modify the path of the Reference to Packages
  13. Save the changes, right-click the project again, and select Reload Project
  14. Http://files.cnblogs.com/files/xdot/csprojDif.rar

vs2013 Open VS2010 cannot find the application that this project type is based on MVC2 upgrade MVC5 cannot load Web project

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.