mnj
mnj

Reputation: 3433

BouncyCastle package is restored using .NET Framework version, but runs well on Linux

While building an app that uses BouncyCastle (1.8.9), I'm getting the following warning:

/code/MyProject.csproj : warning NU1701: Package 'BouncyCastle 1.8.9' was restored using '.NETFramework,Version=v4.6.1, .NETFramework,Version=v4.6.2, .NETFramework,Version=v4.7, .NETFramework,Version=v4.7.1, .NETFramework,Version=v4.7.2, .NETFramework,Version=v4.8' instead of the project target framework 'net5.0'. This package may not be fully compatible with your project.

This happens on a Linux host. The app works without any issues. I wonder:

  1. How is that even possible that the package gets restored with the .NET Framework version when I run dotnet build on a Linux box
  2. How does it even run on Linux if the .NET Framework package is included?

Upvotes: 2

Views: 3235

Answers (1)

Cesar Urdaneta
Cesar Urdaneta

Reputation: 93

You can safely replace it by the BouncyCastle.NetCore. It works like a charm for me. Assuming that the app works in Linux and it builds using the .NET Core instead of .NET Framework, which is compatible for Windows only.

Upvotes: 2

Related Questions