Jay S

Jay S

  • 1.8k
  • 230
  • 53.9k

Using compiled .netstandard library throws FileNotFoundException

Sep 30 2022 6:48 PM

I have created a .netstandard2.0 and 2.1 library that within that envrioment and unit tests all working fine.

If I compile it into its dll and reference it into a .net framework 4.8 console app and try and use it I get an error such as:

System.IO.FileNotFoundException: 'Could not load file or assembly 

In the above example its for Microsoft.Extensions.Caching.Memory, Version=, Culture=neutral, PublicKeyToken=adb9793829ddae60' or one of its dependencies

I thought the idea of standard was to create something compatible for all. Or have a missed a step and this error is to be expected?

Answers (2)