Rajat Rokade
Rajat Rokade

Reputation: 115

Which .Net standard version should i use in a library if i have to target both Dot Net Core 3.0 and .Net Framework 4.7.2

I have to migrate few existing Dot Net core 2.2 project to Dot Net core 3.1. There is a project which is devolved based on .Net Framework 4.7.2.

So we have a common library developed based on .Net Standard 2.0 so that it can target both dotnet 2.2 and .Net framework 4.7.2.

Now if i have to migrate my Dotnet core 2.2 to Dotnet core 3.1 and still continue to use the common library i would have to migrate the common libs to .Net Standard 2.1 (In order to support Dot net core 3.x) but this migration to .Net Standard 2.1 will not allow a .net framework project to use the common library.

Is there any way to handle this current situation?

Upvotes: 1

Views: 519

Answers (1)

Stanislav Dontsov
Stanislav Dontsov

Reputation: 1741

You don't need to update your .NET Standard libraries from 2.0 to 2.1. You can still use them in your .NET Core 3.1 projects. It works the other way if you switch to .NET Standard 2.1 then the version of the project that uses this library will have to be minimum .NET Core 3.0.

Upvotes: 6

Related Questions