meJustAndrew
meJustAndrew

Reputation: 6623

How to migrate DLL from .Net Framework to .Net Standard?

I have a solution containing more .Net Framework projects. I need to move the current application libraries to .Net Standard in order to be used by other projects.

I know I can do this by removing the current projects and recreating them with .Net Standard, then adding each class and dependency back to them, until I finish. This approach is acceptable in my case as the application is not huge, but I wonder if there is an easier way than this.

I was looking for something like the way that Target framework is usually changed for projects:

enter image description here

But there is no entry for .Net Standard here.

Upvotes: 7

Views: 2789

Answers (1)

Vova Bilyachat
Vova Bilyachat

Reputation: 19494

You will need to manually edit the .csproj file, modifying the TargetFrameworks tag:

  <PropertyGroup>
    <TargetFrameworks>netstandard1.4;net40;net45</TargetFrameworks>
  </PropertyGroup>

But personally in cases like that I am creating empty project then do replacing of old csproj file.

Upvotes: 5

Related Questions