Exception: System.Management.ManagementException

58 views Asked by At

Unit tests fail surprisingly after no change with these exception after execution:

System.TypeInitializationException: The type initializer for 'DiffEngine.ProcessCleanup' threw an exception.

System.TypeInitializationException
The type initializer for 'DiffEngine.ProcessCleanup' threw an exception.
   at DiffEngine.ProcessCleanup.Kill(String command)
   at DiffEngine.DiffRunner.Kill(String tempFile, String targetFile) in C:\projects\diffengine\src\DiffEngine\DiffRunner_Kill.cs:line 32
   at VerifyEngine.ProcessEquals() in /_/src/Verify/Verifier/VerifyEngine.cs:line 179
   at VerifyEngine.ThrowIfRequired() in /_/src/Verify/Verifier/VerifyEngine.cs:line 119
   at InnerVerifier.VerifyInner(Object target, Func`1 cleanup, IEnumerable`1 targets) in /_/src/Verify/Verifier/InnerVerifier_Inner.cs:line 33
   at InnerVerifier.Verify[T](T target) in /_/src/Verify/Verifier/InnerVerifier_Json.cs:line 80
   at VerifyXunit.Verifier.<>c__DisplayClass1_0.<<Verify>b__0>d.MoveNext() in /_/src/Verify.Xunit/Verifier.cs:line 30
--- End of stack trace from previous location ---
   at Xunit.Sdk.TestInvoker`1.<>c__DisplayClass48_1.<<InvokeTestMethodAsync>b__1>d.MoveNext() in C:\Dev\xunit\xunit\src\xunit.execution\Sdk\Frameworks\Runners\TestInvoker.cs:line 264
--- End of stack trace from previous location ---
   at Xunit.Sdk.ExecutionTimer.AggregateAsync(Func`1 asyncAction) in C:\Dev\xunit\xunit\src\xunit.execution\Sdk\Frameworks\ExecutionTimer.cs:line 48
   at Xunit.Sdk.ExceptionAggregator.RunAsync(Func`1 code) in C:\Dev\xunit\xunit\src\xunit.core\Sdk\ExceptionAggregator.cs:line 90

System.Management.ManagementException
Ungültige Klasse 
   at System.Management.ManagementException.ThrowWithExtendedInfo(ManagementStatus errorCode)
   at System.Management.ManagementObjectCollection.ManagementObjectEnumerator.MoveNext()
   at WindowsProcess.FindAll()+MoveNext() in C:\projects\diffengine\src\DiffEngine\Process\WindowsProcess.cs:line 38
   at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable`1 source, Int32& length)
   at System.Linq.OrderedEnumerable`1.ToList()
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at DiffEngine.ProcessCleanup.Refresh() in C:\projects\diffengine\src\DiffEngine\Process\ProcessCleanup.cs:line 36
   at DiffEngine.ProcessCleanup..cctor() in C:\projects\diffengine\src\DiffEngine\Process\ProcessCleanup.cs:line 30

What I already did:

Reinstall .NET and Rider. Repulled the master of the project. The unit tests work for other team members.

0

There are 0 answers