You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Microsoft.Management.Infrastructure vs System.Management #24803
I was trying to look into a CoreCLR version of Microsoft.Management.Infrastructure and heard about the Windows Compatibility Pack, so found myself here. I was surprised to see System.Management instead of Microsoft.Management.Infrastructure in repo, since I thought the former was basically deprecated from link I posted above.
My question is basically should I revert to using System.Management for compatibility with CoreCLR in future, or is there a CoreCLR version of Microsoft.Management.Infrastructure coming? I am new to WMI and would appreciate any clarification.
We ported System.Management purely to make it easier to port legacy code to.NET Core. We don't recommend new code use it. @ViktorHofer could you please check whether MMI has complete functionality on.NET Core?
The API is compatible with .NET Standard 2.0, only SecurityContext was problematic. Had to add a nuget package and cross-compile as SecurityContext throws on Core because it's stubbed out.
On Windows, we recommend using Microsoft.Management.Infrastructure namespace (aka WMIv2). System.Managmeent (aka WMIv1) is deprecated. On non-Windows, we currently don't have plans to port either namespace.
@czb182 The WindowsPowerShellCompatibilityPack module will be optional. On Windows, the CIM cmdlets are part of the PSCore6 distribution. Not sure if we'll get to porting the WMI cmdlets in 6.1 timeframe as it's turned out to be a much bigger work item than originally anticipated. As for MMI being NetStd compatible, I don't think this is possible as MMI is written in managed C++ which is no longer supported by dotnet.
Activity
iSazonov commentedon Feb 10, 2018
Good question. I wonder too that WMI instead of MMI was ported to .Net Core.
PowerShell Core depends on MMI and currently uses limited version https://www.nuget.org/packages/Microsoft.Management.Infrastructure/ . Tracking Issue PowerShell/PowerShell#4562.
/cc @SteveL-MSFT
danmoseley commentedon Feb 10, 2018
We ported System.Management purely to make it easier to port legacy code to.NET Core. We don't recommend new code use it.
@ViktorHofer could you please check whether MMI has complete functionality on.NET Core?
ViktorHofer commentedon Feb 10, 2018
will do.
ViktorHofer commentedon Feb 11, 2018
The API is compatible with .NET Standard 2.0, only SecurityContext was problematic. Had to add a nuget package and cross-compile as SecurityContext throws on Core because it's stubbed out.
iSazonov commentedon Feb 11, 2018
@danmosemsft It would be good to know what MSFT recommends instead. (Is there a documentation, a blog article or an Issue?)
SteveL-MSFT commentedon Feb 12, 2018
On Windows, we recommend using Microsoft.Management.Infrastructure namespace (aka WMIv2). System.Managmeent (aka WMIv1) is deprecated. On non-Windows, we currently don't have plans to port either namespace.
czb182 commentedon Feb 21, 2018
https://blogs.msdn.microsoft.com/powershell/2018/01/24/powershell-core-6-1-roadmap/
powershell core 6.1 will bring WMI, leveraging .net windows compatibility pack. So this means WMI with powershell core WMI will be built over System.Management rather than MMI? If MMI could be made NetStandard compatible, then maybe it would be useful for powershell team and included in compatibility pack? Maybe then we could get netstandard compatible version of library on nuget to replace
https://www.nuget.org/packages/Microsoft.Management.Infrastructure/
SteveL-MSFT commentedon Feb 22, 2018
@czb182 The WindowsPowerShellCompatibilityPack module will be optional. On Windows, the CIM cmdlets are part of the PSCore6 distribution. Not sure if we'll get to porting the WMI cmdlets in 6.1 timeframe as it's turned out to be a much bigger work item than originally anticipated. As for MMI being NetStd compatible, I don't think this is possible as MMI is written in managed C++ which is no longer supported by dotnet.
Remove sub-array allocation from GetManifestResourceNamesList (#26601)
Remove sub-array allocation from GetManifestResourceNamesList (#26601)