简体   繁体   中英

Is there a way to change existing project type from ASP.NET Web Application to ASP.NET MVC Application in VS 2008?

So Visual Studio offers MVC content in context menus for "Add View", etc...

Sure, i can create a new MVC Web Application project type and move the files from the non-MVC one there, but is there a way to change the project type without doing that step?

Do you mean some sort of wizard or tool to convert from a web forms app to MVC? No, there is no such tool in VS. It would be extremely hard to do as the architectures are quite different I'm afraid.

There is no conversion tool I know of but it should be fairly simple with a text editor. Create a new MVC Web application. Open both project files in a text editor and copy the set of file entries from the old project into the new one. Of course don't over-write the existing file entries that the new one would have create for you.

It will be a bit of mess though including both in the same app. You will have to be careful with the routing configuration.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM