We have a .Net Framework 4.7 application, that has a dependency on another project in the solution which targets .NET Standard 2.0.
This project again has a dependency on another (external) .NET Standard 2.0 library which has been added through a private Nuget repo. This library depends on Microsoft.Win32
for Registry lookup.
When debugging the .Net FW application, we get a FileNotFoundException during runtime:
System.IO.FileNotFoundException: 'Could not load file or assembly 'Microsoft.Win32.Registry, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.'
I changed the library that uses the Registry and added the Microsoft.Win32.Registry
package.
When debugging again the error then changed to a different version:
Could not load file or assembly 'Microsoft.Win32.Registry, Version=4.1.3.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
Where do we put the efforts into fixing this? Is something configured wrong in the library that uses Win32.Registry? Or is it the .NET Standard project depending on it? Or in the top layer in the .NET 4.7 application?