Sergei Shemshur
Sergei Shemshur

Reputation: 56

Can I port a .NET project to .NET Core and use a DLL dependency from .NET 4.0?

I was looking at the possibility of porting a small project from Windows .NET framework to Ubuntu (linux) using open source .NET Core. But my project has a dependency from another much bigger .NET 4.0 project. Can I just add a reference to the .NET 4 DLL dependency?

Upvotes: 2

Views: 172

Answers (1)

Nate Barbettini
Nate Barbettini

Reputation: 53600

Any dependencies of a .NET Core project must also support .NET Core. So, if you have a dependency that requires .NET Framework 4, you won't be able to build your new project on .NET Core.

You'll have to replace the dependency with one that supports netstandard1.X in order to use it in a .NET Core project.

Upvotes: 2

Related Questions