For one our Mumbai Clients we were migrating a ASP.NET MVC core 1 project on VS 2015 to ASP.NET MVC Core 2 on VS 2017.
After migration we were hitting “Unload to load DLL” error and the source of error was kestrel. Once we changed the project properties to X64 it started working.
I would suggest to follow the below road map for migrating ASP.NET MVC core 1 to 2.
- Install VS 2017 and ensure you have .NET core 2.0.0 sdk in your machine.
- Use dotnet migrate and migrate the csproj file. You do not need to migrate the solution.
- Use dotnet restore to ensure that the project restores all .NET core files.
- Open the visual studio solution and probably you will need to add the Web project manually. So use add existing and add it.
- Change project properties to 64 bit compilation.
- Compile the full project check if there are any compilation errors.
- You would also need to do API changes there are not too many. But for our project we needed to fix keyLength and KeyValue fix it.
- Kestrel now needs a rewind for request so create a middle ware for it to rewind the request.
Finally do not forget to Test test and test before going live.
We have ASP.NET MVC Core training happening in Mumbai Andheri this coming week for syllabus please do visit http://stepbystepschools.net/?page_id=315