views:

95

answers:

3

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?

A: 

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 Haigh
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
A: 

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
Thanks for reminding me about the project file,replacing the <ProjectTypeGuids> in Web Application .cproj with the ones from MVC Application .cproj did the trick for me.
æther