I have a working ASP.NET MVC 5 application and I need to run it under vNext. I assume there is no simple import possibility, so I'll need to do it manually. So basically I have a blank vNext project and a ready MVC5 project. I'll try to copy files and rewrite all dependencies in JSON config files. Maybe anyone tried to do something similar and can recommend best way and key points to achieve this task?
-
You have to do this manually. What steps you need to take to make your project work depends entirely on what features you used in MVC5 and System.Web. Try it and post questions with code samples of what doesn't work if you get stuck. Your questions is off-topic for SO in my opinion as it stands now.AndersNS– AndersNS2014-11-07 11:14:44 +00:00Commented Nov 7, 2014 at 11:14
-
2You can't run mvc 5 on vnextdavidfowl– davidfowl2014-11-08 23:40:45 +00:00Commented Nov 8, 2014 at 23:40
-
Write it from scratch. Sure you can lift your existing code snippets (somewhat) here-n-there, but if you totally want to use the full vNext ecosystem, you're better off writing from scratch. Oh, and do not even think about migrating to EF7 (if you're using EF). They should have named it EFNext v1 since its not really an upgrade, rather a radically new beast (there was even a discussion in EF blogs or github about choosing the name).Mrchief– Mrchief2015-11-18 18:30:23 +00:00Commented Nov 18, 2015 at 18:30
1 Answer
There are a few gotchas. One of them is the usage of notorious HttpContext.Current. It's basically gone in vNext. See if you have any usage for this inside your codebase.
As a general approach, in my personal opinion, do not ever try to upgrade an application in one go. There are so many new pieces that it's really hard to get a grasp of in a big giant app. Write small PoC samples to see each functionality in isolation. It will be easier to put them together when you know how each of them behave. I believe that's the best way to both learn the new system and understand the upgrade pains.
I have been following this approach to make it easy to move to the new system. It's a slower approach but it makes me learn the new system in a better way.
Also check out this discussion in ASP.NET Forums.