Closed ssteiner closed 6 years ago
Hi,
Most of the .Add()
methods on DeviceIdBuilder
are present in the .NET Standard DLL, with the exception of .AddMacAddress()
, .AddProcessorId()
, and .AddMotherboardSerialNumber()
. These three are missing by design, as they depend on WMI (which isn't present in .NET Standard).
I'm in the process of planning a new release that uses the Windows Compatibility Pack for .NET Core to add in these extra features.
If you don't want to wait, you can directly include the DeviceId source code in your project, and reference the Microsoft.Windows.Compatibility
package, and everything should work.
Hope this helps!
Actually, it looks like the Windows Compatibility Pack isn't really needed. I'll can probably just add a reference to System.Management and that should be sufficient.
Those three methods will still be Windows-only, though.
I've just pushed a new version that should add support for the missing functionality (on Windows only).
Thanks!
Could it be that the .NET standard version is missing some code? I just added deviceId 4.0 to y .NET standard 2.0 project, and it seems the dll does not contain the DeviceIdBuilderExtensions, so calling any .AddXYZ() methods on the DeviceIdBuilder is not possible.