Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
atrindade77 opened this issue Aug 21, 2023 · 0 comments
Labels
Milestone

Comments

@atrindade77
Copy link

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

@SimonCropp SimonCropp added this to the 20.8.1 milestone Aug 21, 2023
@SimonCropp SimonCropp added the Bug label Aug 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants