CheapASPNETHostingReview.com | Best and cheap ASP.NET Core 1.0 hosting. In this review I will explain about How to Migration from ASP.NET Core 1.0.x to 1.1.
This post is coming out of order so the repo that goes with this post will contain some items not covered in posts yet. The starting point of the repo can be found here.
Installation
Make sure you already have Visual Studio 2015 Update 3 installed with .NET Core 1.0.1 tools Preview 2 installed. If not use the previous links to install the needed versions. Next head over to the download page for .NET Core and under All downloads and select Current and SDK and select the download for your OS.
Project.json
Project.json is the file that contains all the versions of assembles used by the application. A couple of items need to edited by hand and the rest can be updated using NuGet UI or you can change them all by hand if you like.
First the by hand items. The platform version needs to be updated to 1.1.
1 2 3 4 5 6 7 8 9 10 11 | Before: "Microsoft.NETCore.App": { "version": "1.0.0", "type": "platform" } After: "Microsoft.NETCore.App": { "version": "1.1.0", "type": "platform" } |
The second by hand item is the net core app version in the frameworks section.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | Before: "frameworks": { "netcoreapp1.0": { "imports": [ "dotnet5.6", "portable-net45+win8" ] } After: "frameworks": { "netcoreapp1.1": { "imports": [ "dotnet5.6", "portable-net45+win8" ] } |
Here is the resulting dependencies and tools sections.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | "dependencies": { "Microsoft.NETCore.App": { "version": "1.1.0", "type": "platform" }, "Microsoft.AspNetCore.Authentication.Cookies": "1.1.0", "Microsoft.AspNetCore.Diagnostics": "1.1.0", "Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore": "1.1.0", "Microsoft.AspNetCore.Identity.EntityFrameworkCore": "1.1.0", "Microsoft.AspNetCore.Mvc": "1.1.0", "Microsoft.AspNetCore.Razor.Tools": { "version": "1.1.0-preview4-final", "type": "build" }, "Microsoft.AspNetCore.Server.IISIntegration": "1.1.0", "Microsoft.AspNetCore.Server.Kestrel": "1.1.0", "Microsoft.AspNetCore.StaticFiles": "1.1.0", "Microsoft.EntityFrameworkCore.SqlServer": "1.1.0", "Microsoft.EntityFrameworkCore.SqlServer.Design": { "version": "1.1.0", "type": "build" }, "Microsoft.EntityFrameworkCore.Tools": { "version": "1.0.0-preview3-final", "type": "build" }, "Microsoft.Extensions.Configuration.EnvironmentVariables": "1.1.0", "Microsoft.Extensions.Configuration.Json": "1.1.0", "Microsoft.Extensions.Configuration.UserSecrets": "1.1.0", "Microsoft.Extensions.Logging": "1.1.0", "Microsoft.Extensions.Logging.Console": "1.1.0", "Microsoft.Extensions.Logging.Debug": "1.1.0", "Microsoft.Extensions.Options.ConfigurationExtensions": "1.1.0", "Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.1.0", "Microsoft.VisualStudio.Web.CodeGeneration.Tools": { "version": "1.1.0-preview4-final", "type": "build" }, "Microsoft.VisualStudio.Web.CodeGenerators.Mvc": { "version": "1.1.0-preview4-final", "type": "build" }, "BundlerMinifier.Core": "2.2.301" }, "tools": { "BundlerMinifier.Core": "2.2.301", "Microsoft.AspNetCore.Razor.Tools": "1.1.0-preview4-final", "Microsoft.AspNetCore.Server.IISIntegration.Tools": "1.1.0-preview4-final", "Microsoft.EntityFrameworkCore.Tools": "1.1.0-preview4-final", "Microsoft.Extensions.SecretManager.Tools": "1.1.0-preview4-final", "Microsoft.VisualStudio.Web.CodeGeneration.Tools": { "version": "1.1.0-preview4-final", "imports": [ "portable-net45+win8" ] } } |
Make note that using the NuGet UI will update the dependencies but not the tools section. For some reason the tools section doesn’t seem to have intellisense so I ended up searching the NuGet site to find the new versions. If you do end up changing the tooling version I recommend doing a dotnet restore in the project directory from the command prompt to ensure the proper versions get downloaded.
Wrapping up
As I said this was a really pain less migration. Make sure you check out the release pages ( .NET Core 1.1, ASP.NET Core 1.1 and Entity Framework 1.1) for the details on what has changed. For example ASP.NET Core has gotten significant performance increases with this release as well as URL Rewriting Middleware and Response Caching Middleware.
It has been less than six months since the initial release of ASP.NET Core until the 1.1 release which a huge increase in the pace of releases compared regular ASP.NET. From what I have see this is a pace the team will continue.