Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change .NET Framework to .NET Standard/Core in Visual Studio?

I have a solution in C# in Visual Studios. It was first created in .NET Framework. I want to convert the project to .NET Standard/Core. If I go into project --> properties I see the attached screen, where Target Framework is .NET Framework. How am I able to change that to .NET Standard/Core?

project --> properties: Target Framework Currently set to .NET Framework

like image 559
ENV Avatar asked Sep 03 '20 12:09

ENV


Video Answer


1 Answers

As Roman Ryzhiy mentions in the comments, this is the way to go:

https://docs.microsoft.com/en-us/dotnet/core/porting/

This worked fine for me, I upgraded a .NET Framework 4.7.2 projekt. It was a small project, so I had few aftermath-problems. After the upgrade, the Target Framework in the Application tab will say ".NET 5.0".

  1. Install upgrade-assistant:

    dotnet tool install -g upgrade-assistant

  2. Go to your solution folder

  3. Run the assistant:

    upgrade-assistant upgrade your-project-name.csproj

  4. Follow the steps in the assistant, it's really straight-forward.

Also, here are the steps more detailed:

https://docs.microsoft.com/en-us/dotnet/core/porting/upgrade-assistant-overview#installation-steps

like image 185
Snorvarg Avatar answered Oct 13 '22 09:10

Snorvarg