4.6.1 migrating to .Net Core 7 – How do I resolve error MC1000- cannot find type System.Management.Instrumentation.InstrumentedAttribute in Assembly ..path \.nuget\packages\system.management\7.0.0\lib\net6.0\SystemManagement.dll – Microsoft.WinFx.Targets

Dozier, Fletcher [US] (DS) 1 Reputation point
2022-11-29T01:11:01.337+00:00

I am migrating a .netFramework 4.6.1 application to core. I have been able to get rid of all of the build errors except this one:

Error MC1000 Unknown build error, 'Could not find type 'System.Management.Instrumentation.InstrumentedAttribute' in assembly 'C:\Users\xxxxx.nuget\packages\system.management\7.0.0\lib\net6.0\System.Management.dll'.'
AppName C:\Program Files\dotnet\sdk\6.0.402\Sdks\Microsoft.NET.Sdk.WindowsDesktop\targets\Microsoft.WinFX.targets 223

This has been a blocker for about a month now. Does anyone have any idea regarding how the error can be solved? I have adde references to system.management, system.management.Instrumentation.... etc. But it seems like instrumentedAttribute is no longer part of the namespace.

Best Regards.

Windows Forms
Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
1,914 questions
Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
767 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Hardik Patel 0 Reputation points
    2023-02-03T21:47:03.9733333+00:00

    Hi @Dozier, Fletcher [US] (DS) ,

    Did you get fix for this problem?

    I am trying to convert windows service from .net framework to .net core but one of referenced dll is using InstrumentedAttribute/System.Management. I am not able to get ahead from this. I tried to use System.Management and windows.compatability package from .nuget.

    Please advise.

    Thanks!


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.