Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

How to Migrate .NET Core Projects From 2.0 to 2.1

DZone's Guide to

How to Migrate .NET Core Projects From 2.0 to 2.1

This article makes is easy to learn how to transfer your .NET Core web development projects to the latest version of the popular framework.

· Web Dev Zone ·
Free Resource

Jumpstart your Angular applications with Indigo.Design, a unified platform for visual design, UX prototyping, code generation, and app development.

New features for ASP.NET Core 2.1 have been released and a couple features that I am very interested in are EF Core 2.1 Query Types (which Julie Lerman recently wrote about in MSDN mag) and SignalR, but I will have to upgrade my existing .NET Core repository  in order to play with these, so let's get to work.

Going to be following this article and a recently written document on project migration.

The steps are:

  1. Download  ASP.NET Core 2.1 SDK.
  2.  replace <TargetFramework>netcoreapp2.0</TargetFramework> with <TargetFramework>netcoreapp2.1</TargetFramework>
  3. Remove the references to DotNetCliToolReference in certain packages.
  4. Bonus Round: Getting VSTS to build .NET Core  2.1.

Install ASP.NET Core 2.1 SDK

Downloaded a file named dotnet-sdk-2.1.302-win-gs-x64.exe. When I clicked on the "Download .NET SDK" with a size of about 135 MB, I ran the file and accepted the run.

The first step is complete; that seemed easy enough.

Replace TargetFramework Value With netcoreapp2.1

So I used Notepad'++'s  Find in Files - I tend to use this for smaller text replacements.

That seemed to find everything I needed to replace:

So, I ran it a second time, this time making the necessary text replacements. I checked a few, and it all looked good.

Ok, so step 1, in theory, is done.

Now, I went back to my project and opened up one of my projects that, other than referencing Core 2.0, had no code, NuGet packages, or dependencies. I built it and it was successful now that it was pointing to Core 2.1. So that's progress.

Replace AspNetCore.All With AspNetCore.App

So my first step, as a test, is to remove the reference from one project with AspNetCore.All to see how bad it is. I picked one project called WebApi and removed the reference. I didn't see any other references drop. Ok, so far so good.

Now keep in mind that, at this point, the NuGet Package manager is telling me this project has no packages installed because it can't build because of it pointing to netcoreapp2.1 which doesn't exist as a valid reference.

Now the blow for me was the License Acceptance. When I went to install  Microsoft.AspNetCore.App it wanted me to accept at my estimate (I got the scroll bar about a quarter of the down the page, with 65  packages counted) about 200+ licenses.

Also, I can't copy and paste the license acceptance. With that much to go through it makes it almost impossible for a developer to be able to review this. Sure we have tooling to review dependencies issues and vulnerabilities but who are we even kidding at this point with these type of acceptances?

I hit "I Accept," but, honestly, its the first time I had signed up for 200 plus agreements with one click; feel free to take a look at what was installed.

Restoring packages for D:\Repository\CSharpRomp\CSharpRomp.WebApi\CSharpRomp.WebApi.csproj...
Installing NuGet package Microsoft.AspNetCore.App 2.1.2.
Committing restore...
Generating MSBuild file D:\Repository\CSharpRomp\CSharpRomp.WebApi\obj\CSharpRomp.WebApi.csproj.nuget.g.props.
Generating MSBuild file D:\Repository\CSharpRomp\CSharpRomp.WebApi\obj\CSharpRomp.WebApi.csproj.nuget.g.targets.
Writing lock file to disk. Path: D:\Repository\CSharpRomp\CSharpRomp.WebApi\obj\project.assets.json
Restore completed in 2.36 sec for D:\Repository\CSharpRomp\CSharpRomp.WebApi\CSharpRomp.WebApi.csproj.
Successfully uninstalled 'Microsoft.Win32.Registry 4.4.0' from CSharpRomp.WebApi
Successfully uninstalled 'System.Data.SqlClient 4.4.3' from CSharpRomp.WebApi
Successfully uninstalled 'System.Security.AccessControl 4.4.0' from CSharpRomp.WebApi
Successfully uninstalled 'System.Security.Principal.Windows 4.4.0' from CSharpRomp.WebApi
Successfully uninstalled 'System.Text.Encoding.CodePages 4.4.0' from CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNet.WebApi.Client 5.2.6' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore 2.1.2' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Antiforgery 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.App 2.1.2' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Authentication 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Authentication.Abstractions 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Authentication.Cookies 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Authentication.Core 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Authentication.Facebook 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Authentication.Google 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Authentication.JwtBearer 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Authentication.MicrosoftAccount 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Authentication.OAuth 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Authentication.OpenIdConnect 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Authentication.Twitter 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Authentication.WsFederation 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Authorization 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Authorization.Policy 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Connections.Abstractions 2.1.2' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.CookiePolicy 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Cors 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Cryptography.Internal 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Cryptography.KeyDerivation 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.DataProtection 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.DataProtection.Abstractions 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.DataProtection.Extensions 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Diagnostics 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Diagnostics.Abstractions 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.HostFiltering 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Hosting 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Hosting.Abstractions 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Hosting.Server.Abstractions 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Html.Abstractions 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Http 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Http.Abstractions 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Http.Connections 1.0.2' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Http.Connections.Common 1.0.2' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Http.Extensions 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Http.Features 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.HttpOverrides 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.HttpsPolicy 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Identity 2.1.2' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Identity.EntityFrameworkCore 2.1.2' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Identity.UI 2.1.2' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.JsonPatch 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Localization 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Localization.Routing 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.MiddlewareAnalysis 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Mvc 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Mvc.Abstractions 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Mvc.Analyzers 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Mvc.ApiExplorer 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Mvc.Core 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Mvc.Cors 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Mvc.DataAnnotations 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Mvc.Formatters.Json 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Mvc.Formatters.Xml 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Mvc.Localization 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Mvc.Razor 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Mvc.Razor.Extensions 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Mvc.Razor.ViewCompilation 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Mvc.RazorPages 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Mvc.TagHelpers 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Mvc.ViewFeatures 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.NodeServices 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Owin 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Razor 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Razor.Design 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Razor.Language 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Razor.Runtime 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.ResponseCaching 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.ResponseCaching.Abstractions 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.ResponseCompression 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Rewrite 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Routing 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Routing.Abstractions 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Server.HttpSys 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Server.IISIntegration 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Server.Kestrel 2.1.2' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Server.Kestrel.Core 2.1.2' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Server.Kestrel.Https 2.1.2' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions 2.1.2' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets 2.1.2' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.Session 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.SignalR 1.0.2' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.SignalR.Common 1.0.2' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.SignalR.Core 1.0.2' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.SignalR.Protocols.Json 1.0.2' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.SpaServices 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.SpaServices.Extensions 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.StaticFiles 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.WebSockets 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.AspNetCore.WebUtilities 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.CodeAnalysis.Analyzers 1.1.0' to CSharpRomp.WebApi
Successfully installed 'Microsoft.CodeAnalysis.Common 2.8.0' to CSharpRomp.WebApi
Successfully installed 'Microsoft.CodeAnalysis.CSharp 2.8.0' to CSharpRomp.WebApi
Successfully installed 'Microsoft.CodeAnalysis.Razor 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.CSharp 4.5.0' to CSharpRomp.WebApi
Successfully installed 'Microsoft.DotNet.PlatformAbstractions 2.1.0' to CSharpRomp.WebApi
Successfully installed 'Microsoft.EntityFrameworkCore 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.EntityFrameworkCore.Abstractions 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.EntityFrameworkCore.Analyzers 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.EntityFrameworkCore.Design 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.EntityFrameworkCore.InMemory 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.EntityFrameworkCore.Relational 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.EntityFrameworkCore.SqlServer 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.EntityFrameworkCore.Tools 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.Extensions.Caching.Abstractions 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.Extensions.Caching.Memory 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.Extensions.Caching.SqlServer 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.Extensions.Configuration 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.Extensions.Configuration.Abstractions 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.Extensions.Configuration.Binder 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.Extensions.Configuration.CommandLine 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.Extensions.Configuration.EnvironmentVariables 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.Extensions.Configuration.FileExtensions 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.Extensions.Configuration.Ini 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.Extensions.Configuration.Json 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.Extensions.Configuration.KeyPerFile 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.Extensions.Configuration.UserSecrets 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.Extensions.Configuration.Xml 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.Extensions.DependencyInjection 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.Extensions.DependencyInjection.Abstractions 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.Extensions.DependencyModel 2.1.0' to CSharpRomp.WebApi
Successfully installed 'Microsoft.Extensions.DiagnosticAdapter 2.1.0' to CSharpRomp.WebApi
Successfully installed 'Microsoft.Extensions.FileProviders.Abstractions 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.Extensions.FileProviders.Composite 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.Extensions.FileProviders.Embedded 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.Extensions.FileProviders.Physical 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.Extensions.FileSystemGlobbing 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.Extensions.Hosting 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.Extensions.Hosting.Abstractions 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.Extensions.Http 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.Extensions.Identity.Core 2.1.2' to CSharpRomp.WebApi
Successfully installed 'Microsoft.Extensions.Identity.Stores 2.1.2' to CSharpRomp.WebApi
Successfully installed 'Microsoft.Extensions.Localization 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.Extensions.Localization.Abstractions 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.Extensions.Logging 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.Extensions.Logging.Abstractions 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.Extensions.Logging.Configuration 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.Extensions.Logging.Console 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.Extensions.Logging.Debug 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.Extensions.Logging.EventSource 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.Extensions.Logging.TraceSource 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.Extensions.ObjectPool 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.Extensions.Options 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.Extensions.Options.ConfigurationExtensions 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.Extensions.Primitives 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.Extensions.WebEncoders 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.IdentityModel.Logging 5.2.0' to CSharpRomp.WebApi
Successfully installed 'Microsoft.IdentityModel.Protocols 5.2.0' to CSharpRomp.WebApi
Successfully installed 'Microsoft.IdentityModel.Protocols.OpenIdConnect 5.2.0' to CSharpRomp.WebApi
Successfully installed 'Microsoft.IdentityModel.Protocols.WsFederation 5.2.0' to CSharpRomp.WebApi
Successfully installed 'Microsoft.IdentityModel.Tokens 5.2.0' to CSharpRomp.WebApi
Successfully installed 'Microsoft.IdentityModel.Tokens.Saml 5.2.0' to CSharpRomp.WebApi
Successfully installed 'Microsoft.IdentityModel.Xml 5.2.0' to CSharpRomp.WebApi
Successfully installed 'Microsoft.Net.Http.Headers 2.1.1' to CSharpRomp.WebApi
Successfully installed 'Microsoft.Win32.Primitives 4.3.0' to CSharpRomp.WebApi
Successfully installed 'Microsoft.Win32.Registry 4.5.0' to CSharpRomp.WebApi
Successfully installed 'NETStandard.Library 1.6.1' to CSharpRomp.WebApi
Successfully installed 'Newtonsoft.Json 11.0.2' to CSharpRomp.WebApi
Successfully installed 'Newtonsoft.Json.Bson 1.0.1' to CSharpRomp.WebApi
Successfully installed 'Remotion.Linq 2.2.0' to CSharpRomp.WebApi
Successfully installed 'runtime.debian.8-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.0' to CSharpRomp.WebApi
Successfully installed 'runtime.fedora.23-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.0' to CSharpRomp.WebApi
Successfully installed 'runtime.fedora.24-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.0' to CSharpRomp.WebApi
Successfully installed 'runtime.native.System 4.3.0' to CSharpRomp.WebApi
Successfully installed 'runtime.native.System.IO.Compression 4.3.0' to CSharpRomp.WebApi
Successfully installed 'runtime.native.System.Net.Http 4.3.0' to CSharpRomp.WebApi
Successfully installed 'runtime.native.System.Security.Cryptography.Apple 4.3.0' to CSharpRomp.WebApi
Successfully installed 'runtime.native.System.Security.Cryptography.OpenSsl 4.3.0' to CSharpRomp.WebApi
Successfully installed 'runtime.opensuse.13.2-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.0' to CSharpRomp.WebApi
Successfully installed 'runtime.opensuse.42.1-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.0' to CSharpRomp.WebApi
Successfully installed 'runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.Apple 4.3.0' to CSharpRomp.WebApi
Successfully installed 'runtime.osx.10.10-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.0' to CSharpRomp.WebApi
Successfully installed 'runtime.rhel.7-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.0' to CSharpRomp.WebApi
Successfully installed 'runtime.ubuntu.14.04-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.0' to CSharpRomp.WebApi
Successfully installed 'runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.0' to CSharpRomp.WebApi
Successfully installed 'runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.AppContext 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.Buffers 4.5.0' to CSharpRomp.WebApi
Successfully installed 'System.Collections 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.Collections.Concurrent 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.Collections.Immutable 1.5.0' to CSharpRomp.WebApi
Successfully installed 'System.Collections.NonGeneric 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.Collections.Specialized 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.ComponentModel.Annotations 4.5.0' to CSharpRomp.WebApi
Successfully installed 'System.Console 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.Data.SqlClient 4.5.1' to CSharpRomp.WebApi
Successfully installed 'System.Diagnostics.Contracts 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.Diagnostics.Debug 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.Diagnostics.DiagnosticSource 4.5.0' to CSharpRomp.WebApi
Successfully installed 'System.Diagnostics.FileVersionInfo 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.Diagnostics.StackTrace 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.Diagnostics.Tools 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.Diagnostics.Tracing 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.Dynamic.Runtime 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.Globalization 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.Globalization.Calendars 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.Globalization.Extensions 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.IdentityModel.Tokens.Jwt 5.2.0' to CSharpRomp.WebApi
Successfully installed 'System.Interactive.Async 3.1.1' to CSharpRomp.WebApi
Successfully installed 'System.IO.Compression 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.IO.Compression.ZipFile 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.IO.FileSystem 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.IO.FileSystem.Primitives 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.IO.Pipelines 4.5.0' to CSharpRomp.WebApi
Successfully installed 'System.Linq 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.Linq.Expressions 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.Linq.Queryable 4.0.1' to CSharpRomp.WebApi
Successfully installed 'System.Memory 4.5.1' to CSharpRomp.WebApi
Successfully installed 'System.Net.Http 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.Net.Primitives 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.Net.Sockets 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.Net.WebSockets.WebSocketProtocol 4.5.1' to CSharpRomp.WebApi
Successfully installed 'System.Numerics.Vectors 4.5.0' to CSharpRomp.WebApi
Successfully installed 'System.ObjectModel 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.Private.DataContractSerialization 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.Reflection.Emit 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.Reflection.Extensions 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.Reflection.Metadata 1.6.0' to CSharpRomp.WebApi
Successfully installed 'System.Resources.ResourceManager 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.Runtime.CompilerServices.Unsafe 4.5.1' to CSharpRomp.WebApi
Successfully installed 'System.Runtime.Extensions 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.Runtime.Handles 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.Runtime.InteropServices 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.Runtime.InteropServices.RuntimeInformation 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.Runtime.Numerics 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.Runtime.Serialization.Primitives 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.Runtime.Serialization.Xml 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.Security.AccessControl 4.5.0' to CSharpRomp.WebApi
Successfully installed 'System.Security.Claims 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.Security.Cryptography.Algorithms 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.Security.Cryptography.Cng 4.5.0' to CSharpRomp.WebApi
Successfully installed 'System.Security.Cryptography.Csp 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.Security.Cryptography.Encoding 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.Security.Cryptography.OpenSsl 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.Security.Cryptography.Pkcs 4.5.0' to CSharpRomp.WebApi
Successfully installed 'System.Security.Cryptography.Primitives 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.Security.Cryptography.X509Certificates 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.Security.Cryptography.Xml 4.5.0' to CSharpRomp.WebApi
Successfully installed 'System.Security.Permissions 4.5.0' to CSharpRomp.WebApi
Successfully installed 'System.Security.Principal 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.Security.Principal.Windows 4.5.0' to CSharpRomp.WebApi
Successfully installed 'System.Text.Encoding.CodePages 4.5.0' to CSharpRomp.WebApi
Successfully installed 'System.Text.Encoding.Extensions 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.Text.Encodings.Web 4.5.0' to CSharpRomp.WebApi
Successfully installed 'System.Text.RegularExpressions 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.Threading 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.Threading.Channels 4.5.0' to CSharpRomp.WebApi
Successfully installed 'System.Threading.Tasks.Extensions 4.5.1' to CSharpRomp.WebApi
Successfully installed 'System.Threading.Tasks.Parallel 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.Threading.Thread 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.Threading.Timer 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.ValueTuple 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.Xml.ReaderWriter 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.Xml.XDocument 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.Xml.XmlDocument 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.Xml.XmlSerializer 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.Xml.XPath 4.3.0' to CSharpRomp.WebApi
Successfully installed 'System.Xml.XPath.XDocument 4.3.0' to CSharpRomp.WebApi
Executing script file 'C:\Users\daxmax\.nuget\packages\microsoft.entityframeworkcore.tools\2.1.1\tools\init.ps1'...
Executing nuget actions took 3.09 sec
Time Elapsed: 00:00:05.7809010
========== Finished ==========

Now, keep in mind I have two projects that have a dependency on AspNetCore.All. So I attempt to rebuild WebApi and have success. Mileage may vary as the document does describe that removing AspNetCore.All will remove any dependent NuGet packages, but, for my little test project, that seemed fine. Moving on to doing the same in the Web UI project.

I got an odd error when trying to install AspNetCore.App: "Version conflict detected for Microsoft.CodeAnalysis.Common." I did a couple searches and landed on this GitHub article which suggested some package updates, which I did do and it seemed to clear up this error for me.

Remove References to DotNetCliToolReference

So I checked for the packages in the list, and I wasn't using any of them and that made this step easy. For 100% assurance, I did a scan for that value:

  • Microsoft.DotNet.Watcher.Tools
  • Microsoft.EntityFrameworkCore.Tools.DotNet
  • Microsoft.Extensions.Caching.SqlConfig.Tools
  • Microsoft.Extensions.SecretManager.Tools

Now there was an optional step to remove DotNetCliTooLReference for CodeGeneration.Tools and that one I did have. The article mentioned that can be removed using a  command dotnet tool install -g dotnet-aspnet-codegenerator.

I ran it a second time because it ran too fast, but, sure enough, it was already installed. So my project CSharpRomp was upgraded.

Unfortunately, I had various other items not committed when I started this, so the git commit is a mix of various changes, but you are welcome to dissect those changes on my GitHub repo, here.

Bonus Round: VSTS Build

So, if you were following along, you know we just installed the 2.1.3 SDK locally but VSTS doesn't know about that. So you will need to include a handy-dandy .NET Core Tool Installer which is a task type on build. This tool will allow you to install the SDK package. Adam Storr details most of this here.

If you need release versions, check GitHub, here.

Take a look at the Indigo.Design sample applications to learn more about how apps are created with design to code software.

Topics:
.net core ,migration ,vsts ,web dev ,tutorial

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}