I have made a dll in .net core 6 and I want to call it in an asp.net project having framework 4.8. I just clicked Add Reference and browsed the dll. When I run the project, it gives the following exception:
Could not load file or assembly 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
Any ideas how to solve this?
Microsoft.Extensions.*packages, you won't have problems if you add them directly, as they target .NET Standard 2.0. If you use a library that uses the Microsoft.Extensions.*, you should change it into a .NET Standard library if you want to use it in .NET Framework applications