Click here to Skip to main content
15,887,135 members
Articles / .NET / .NET Core

How to Update Net Core 2.0 Application to 2.1 Version

Rate me:
Please Sign up or sign in to vote.
4.00/5 (2 votes)
26 May 2018CPOL4 min read 14.1K   3   2
Update .NET Core 2.0 app to 2.1 version

Table of Contents

Introduction

Many of you might have been developing applications in NET Core 2.0 version, as that was the main release with lots of features. But did you know that the next big release has already happened with some additional features in the .NET Core journey? Have you already migrated your applications to .NET Core 2.1.x version already? If you haven’t, no worries, here in this post, we are going to talk about how we can migrate/update our applications to the new version of .NET Core. I hope you will like this article.

Background

As I said, this post is only going to cover the steps you may have to take to update your existing .NET Core application to 2.1.x. And I will not be talking about what is .NET Core? And why .NET Core is important? etc., if you have those queries in your mind, I strongly recommend you read the Microsoft document here.

We will be creating a .NET Core 2.0 application first, and then we will update the same to 2.1.x version. Sounds good?

.NET Core 2.0 to 2.1.x

Let’s Create a .NET Core 2.0 Application

As usual, open your favorite IDE, Visual Studio 2017, click on File -> New Project.

Image 1

As you can see, ASP NET Core version is 2.0.

You can even check the version in your application properties.

Image 2

Now let’s run our application and see the output:

Image 3

Update Visual Studio 2017 to the Latest

As a first step, to work with .NET Core 2.1, you need to update your IDE. There are a couple of ways you can update your IDE, but the easiest way is to go check the Notifications panel. Let’s see how to do that.

Go to the View tab and click on Notifications:

Image 4

Now you can see all the notifications here as shown in the below image. I always update my Visual Studio whenever there is an update, so you won’t be able to see that notification here on my panel. If you haven’t updated, and if you check the Notifications panel, I am sure you will get a link to the update here. You will be able to do further.

Image 5

Once you have updated, you can verify your version.

Image 6

Install Latest .NET Core

Here, I am going to download the latest version from here, however, you can select which version you want from here.

Image 7

As you can see that we have installed .NET Core SDK, .NET Core Runtime, ASP NET Core Runtime, and now you can see that the new version is available for you in Visual Studio 2017.

Image 8

Changing the Target Frameworks

As the first step, we need to change the Target framework for our application. Here, you can select it in the Properties or you can edit the dot(.)csproj file.

Now it is time to change the Microsoft.AspNetCore.All to Microsoft.AspNetCore.App, as with this version, Microsoft have reduced the number of dependencies. We always need to install only the needed things right, instead of everything.

Image 9

You will always need to change all of your references to the new version. Here, I just wanted to show how you can do that. So, look into the packages you have in your application and change it accordingly.

What is New in Dot(.) NET Core 2.1.x

The Dot NET Core 2.1.x is a release with some cool new features, I strongly recommend you read those here.

I may write a new post with these features soon.

Conclusion

Thanks a lot for reading! Did I miss anything that you think is needed? Could you find this post useful? I hope you liked this article. Please share your valuable suggestions and feedback.

Your Turn. What Do You Think?

A blog isn’t a blog without comments, but do try to stay on topic. If you have a question unrelated to this post, you’re better off posting it on C# Corner, Code Project, Stack Overflow, ASP.NET Forum instead of commenting here. Please leave your question in the Comments section below and I’ll definitely try to help if I can.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
Germany Germany
I am Sibeesh Venu, an engineer by profession and writer by passion. I’m neither an expert nor a guru. I have been awarded Microsoft MVP 3 times, C# Corner MVP 5 times, DZone MVB. I always love to learn new technologies, and I strongly believe that the one who stops learning is old.

My Blog: Sibeesh Passion
My Website: Sibeesh Venu

Comments and Discussions

 
QuestionMessage Closed Pin
17-Jul-20 23:34
Member 1489267917-Jul-20 23:34 
Question** ERROR WHILE TRYING TO UPDATE ** Pin
Member 140412111-Nov-18 19:22
Member 140412111-Nov-18 19:22 
QuestionMuch easier Pin
Klaus Luedenscheidt26-May-18 19:34
Klaus Luedenscheidt26-May-18 19:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.