Closed jarenduan closed 2 years ago
I'm not really familiar with Server 2012 but it looks like it is missing some of the required WMI bits.
You could try targeting .NET Core / .NET 5.
Or you could try the MMI functionality in the v6 alpha release:
var deviceId = new DeviceIdBuilder()
.OnWindows(windows => windows.AddProcessorId().AddMacAddressFromMmi(true, true))
.ToString();
Hi, I write a .net5 app that try to get the machine id. The code is simple:
It works fine on win 10, but on a win server 2012 I get this error:
System.PlatformNotSupportedException: The native library 'C:\Windows\Microsoft.NET\Framework\v4.0.30319\wminet_utils.dll' does not have all required functions. Please, update the .NET Framework.
I then install the .net framework 4.8 , but it doesn't help.