问题
I had created a project in .Net Core 2.0 and now with the new release of .Net Core 2.1, I want to update to it. So is it just ok that I go to project properties and update Target Framework to 2.1 or do I also need to make any change in my code? According to this article https://docs.microsoft.com/en-us/aspnet/core/migration/20_21?view=aspnetcore-2.1, Microsoft.AspNetCore.All package is now replaced by Microsoft.AspNetCore.App. So I want to ask if I don't update this package, will anything happen to my existing code? Also there are some changes in program.cs and startup.cs files code etc. So in simple words my question is what are the necessary changes without which my existing code will stop working. Thanks
回答1:
Visit https://www.microsoft.com/net/download/windows , download SDK (2.1) and install it on your machine. Open your project's csproj and update netcoreapp2.0 to netcoreapp2.1 and finally you can update the "Microsoft.AspNetCore.All" to version 2.1.
来源:https://stackoverflow.com/questions/51151040/how-to-update-target-framework-of-net-project