You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 1, 2020. It is now read-only.
I just tried to get an app running that is using WqlEventQuery & ManagementEventWatcher from the System.Management namespace.
However the native code generation is already giving me warnings:
The app later will throw with:
This is the code I use:
varquery=newWqlEventQuery("__InstanceCreationEvent",newTimeSpan(0,0,1),"TargetInstance isa \"Win32_Process\"");varwatcher=newManagementEventWatcher(query);while(true){Thread.Sleep(1);// Wait for process start event.vare=watcher.WaitForNextEvent();varname=((ManagementBaseObject)e["TargetInstance"])["Name"].ToString().ToLowerInvariant();varpath=((ManagementBaseObject)e["TargetInstance"])["ExecutablePath"].ToString();varprocessId=Convert.ToInt32(((ManagementBaseObject)e["TargetInstance"])["ProcessID"]);/// do stuff}
Used command line: dotnet publish -r win-x64 /p:Configuration=Release /p:platform="x64"
.NET Core info:
.NET Core SDK (reflecting any global.json):
Version: 3.0.100-preview-009820
Commit: 799a33c6ba
Runtime Environment:
OS Name: Windows
OS Version: 10.0.18305
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\3.0.100-preview-009820\
Host (useful for support):
Version: 3.0.0-preview-27205-02
Commit: 04035b3a4c
.NET Core SDKs installed:
2.1.500 [C:\Program Files\dotnet\sdk]
2.1.502 [C:\Program Files\dotnet\sdk]
2.1.600-preview-009426 [C:\Program Files\dotnet\sdk]
3.0.100-preview-009820 [C:\Program Files\dotnet\sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.0.0-preview-18579-0056 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.0.0-preview-27205-02 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.0.0-alpha-27128-4 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
The text was updated successfully, but these errors were encountered:
Hey!
I just tried to get an app running that is using
WqlEventQuery
&ManagementEventWatcher
from theSystem.Management
namespace.However the native code generation is already giving me warnings:

The app later will throw with:

This is the code I use:
Used command line:
dotnet publish -r win-x64 /p:Configuration=Release /p:platform="x64"
.NET Core info:
The text was updated successfully, but these errors were encountered: