Not able to use System.Management.dll in Dot Net Core

后端 未结 4 1359
孤街浪徒
孤街浪徒 2021-02-18 13:31

How should I gather Hardware Info if System.Management.dll is not compatible with Dot Net Core.

How do I get the Machine info like Processo

4条回答
  •  故里飘歌
    2021-02-18 14:04

    I found this issue while upgrading from .NetFramework to .NetCore 3.0

    .NetFramework compatible System.Management won't work for the dotnet core, so to fix the issue just add a .Net core compatible System.Management nuget.

    At this point the latest available version is 4.6.0 https://www.nuget.org/packages/System.Management/4.6.0 and latest preview is 4.7.0-preview3.19551.4

提交回复
热议问题