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?
Open the Package Manager Console. Select Tools > NuGet Package Manager > Package Manager Console. The Enable-Migration command creates the Migrations folder, which contains a script to initialize the database. Open the Configuration.
The main difference between ASP.NET Core and ASP.NET MVC 5 is their cross-platform approach. ASP.NET Core can be used on Windows, Mac, or Linux, whereas ASP.NET MVC 5 can only be used for applications on Windows.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With