question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Microsoft.Management.Infrastructure.dll is delay-signed or test-signed

See original GitHub issue

I am trying to use the Microsoft.Management.Infrastructure.dll as a reference in a c# project. I have downloaded the package from nuget (https://www.nuget.org/packages/Microsoft.Management.Infrastructure/) which gives me version 1.0.0.0 . I have the reference included in the build as “Copy Local: True”, and it is properly copied to my /bin/ directory.

Everything works in my development environment without issue. However, when I move the compiled output to another machine, I receive an error:

System.IO.FileLoadException: Could not load file or assembly
'Microsoft.Management.Infrastructure, Version=`1.0.0.0. Culture=neutral,
PublicKeyToken=31bf3856ad364e35' or one of its dependencies. Strong name validation failed

I checked the signing with sn.exe and it shows the following:

`.\Microsoft.Management.Infrastructure.dll is a delay-signed or test-signed assembly`

I see that new preview versions are available on the nuget page, but I have a lot of code that relies on the methods in this .dll, and this code is targeting production, so I am very hesitant to include non-release code.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
TravisEz13commented, Jan 31, 2020

@SteveL-MSFT The error indicates that this was targeting the full framework. We typically don’t strong name sign assemblies when we are intending the binary for .NET Core.

0reactions
iSazonovcommented, Jul 27, 2020

For more information see https://github.com/dotnet/runtime/issues/24803

As workaround you could use mmi.dll from PowerShell distrib.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Microsoft.Management.Infrastructure Strong name ...
FileLoadException: Could not load file or assembly 'Microsoft.Management. ... Infrastructure.dll is a delay-signed or test-signed assembly.
Read more >
Delay-sign an assembly
This article describes delayed or partial signing, which reserves space in the PE file for the strong name signature, but defers the actual ......
Read more >
How do I use Microsoft Management Infrastructure to ...
I read somewhere that using classes in the System.Management namespace to access WMI was outdated, if not deprecated, and that new development ...
Read more >
CimMethodParameter Class
Management.Infrastructure.CimMethodParameter in the Microsoft.Management.Infrastructure namespace. ... Assembly: Microsoft.Management.Infrastructure.dll.
Read more >
CimSubscriptionResult Class
Management.Infrastructure.CimSubscriptionResult in the Microsoft.Management.Infrastructure namespace. ... Assembly: Microsoft.Management.Infrastructure.dll.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found