1

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?

æther
  • 232
  • 3
  • 11

2 Answers2

0

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.

Steve
  • 8,469
  • 1
  • 26
  • 37
  • No, here i'm asking how to make Visual Studio just recognize the project as MVC one, i wouldn't trust a wizard changing the app architecture =) – æther Apr 14 '09 at 09:00
0

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.

AnthonyWJones
  • 187,081
  • 35
  • 232
  • 306
  • Thanks for reminding me about the project file, replacing the in Web Application .cproj with the ones from MVC Application .cproj did the trick for me. – æther Apr 14 '09 at 09:21