Skip to content

System.PlatformNotSupportedException : System.Management currently is only supported for Windows desktop applications. #969

@atrindade77

Description

@atrindade77

Hi,

I just trying do verify a simple model with an Id and Name properties :

var model = new TotoModel { Id = 1, Name= "Alexandre" };
await Verifier.Verify(model);

I get the error :

Message: 
System.TypeInitializationException : The type initializer for 'DiffEngine.ProcessCleanup' threw an exception.
---- System.PlatformNotSupportedException : System.Management currently is only supported for Windows desktop applications.

Stack Trace: 
ProcessCleanup.TryGetProcessInfo(String command, ProcessCommand& process)
DiffRunner.InnerLaunchAsync(TryResolveTool tryResolveTool, String tempFile, String targetFile) line 140
VerifyEngine.ProcessNotEquals() line 179
VerifyEngine.ThrowIfRequired() line 140
InnerVerifier.VerifyInner(Object root, Func1 cleanup, IEnumerable1 targets, Boolean doExpressionConversion) line 27
InnerVerifier.Verify(Object target) line 66
<b__0>d.MoveNext() line 74
--- End of stack trace from previous location ---
CustomersControllerTests.Create() line 34
--- End of stack trace from previous location ---
----- Inner Stack Trace -----
ManagementObjectSearcher.ctor(String queryString)
WindowsProcess.FindAll()+MoveNext() line 33
EnumerableHelpers.ToArray[T](IEnumerable1 source, Int32& length) OrderedEnumerable1.ToList()
Enumerable.ToList[TSource](IEnumerable`1 source)
ProcessCleanup.Refresh() line 34
ProcessCleanup.cctor() line 27

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions