Microsoft.Win32.Registry not working in .net standard 2.0 library RRS feed

  • Question

  • Hello guys i am trying to build a .net standard 2.0 library that get machine id from the registry and it gives me this error

    InnerException {System.IO.FileLoadException: Could not load file or assembly 'Microsoft.Win32.Registry, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
    File name: 'Microsoft.Win32.Registry, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
       at SteamKit2.WindowsInfoProvider.GetMachineGuid()
       at SteamKit2.HardwareUtils.GenerateMachineID()
       at System.Threading.Tasks.Task`1.InnerInvoke()
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)

    } System.Exception {System.IO.FileLoadException}

    Saturday, November 11, 2017 6:24 PM

All replies