Skip to content

.Net 5.0 using older SDK, Core, Standard packages #240

Answered by jnm2
xbotuk asked this question in Q&A
Discussion options

You must be logged in to vote

A project targeting .NET 5 can use libraries which target:

  • .NET 5
  • Any version of .NET Core (1.0–3.1)
  • Any version of .NET Standard (1.0–2.1)
  • Any version of .NET Framework (1.0–4.8) BUT with a build warning and no guarantee against MissingMethodException if the library tries to access something that is in .NET Framework that is not in .NET 5. https://docs.microsoft.com/en-us/dotnet/standard/analyzers/portability-analyzer can tell you whether the library might do this.

If so how

The same way you would reference a .NET 5 library. Using <PackageReference Include="SomePackageId" Version="1.2.3" /> is the standard way, but you can also use <Reference Include="Path/to/SomeAssemblyFile.dll" />.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by akoeplinger
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants