JBoggs
JBoggs

Reputation: 13

Could not load file or assembly System.Management

I just installed Windows 8.1 (migrated from Win 7) and got the following error while building a solution that was working just before migration :

Error 261 Unknown build error, 'Could not load file or assembly 'System.Management, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)' BoggsSystems.Rocky.Shell

What could be causing this? How can the cause be tracked down?

Upvotes: 1

Views: 4348

Answers (2)

Roeland
Roeland

Reputation: 830

I just experienced this issue as well. It turned out that Windows Update updated some of it assemblies. This is how I solved my problem:

  • Dropped the custom assembly from the db. This also dropped the assembly listed in the error
  • I copied the assembly listed from the folder C:\Windows\Microsoft.NET\Framework64\v2.0.50727 into the folder that contained my custom assembly
  • I reloaded the custom assembly into the db. This also reloaded the assembly listed in the error

Upvotes: 0

dwickern
dwickern

Reputation: 3519

I had the same issue: my build works fine on Windows 7, but fails on Windows 8. Also a PRISM based app (coincidence?) which targets .NET 4.

Solved by enabling the Windows feature ".NET Framework 3.5 (includes .NET 2.0 and 3.0)".

Upvotes: 2

Related Questions