'Eventing' 命名空间在 .NET Core 中的 'System.Diagnostics' 和 nix*es 上的 Mono 中不存在
'Eventing' namespace does not exist in 'System.Diagnostics' in .NET Core and Mono on nix*es
我目前正在开发一个 C# 应用程序,它可以使用以下导入读取和查询 Windows 事件日志:
using System.Diagnostics.Eventing.Reader;
此导入在我的 Windows 10 笔记本电脑上运行良好,使用 Visual Studio 2017。但是,我收到以下错误 运行 此导入 dotnet run
并在mcs
:
Program.cs(3,26): error CS0234: The type or namespace name `Eventing' does not
exist in the namespace `System.Diagnostics'. Are you missing an assembly
reference? Compilation failed: 1 error(s), 0 warnings
我已经在 Mac OS X 笔记本电脑和 mono Docker container. It seems like it should work on Mac and Linux since I found the code on their GitHub repository 上尝试过编译。有人知道吗?我一直在尝试寻找 dll
或导入来完成这项工作,但到目前为止没有成功。任何帮助将不胜感激。
.NET Framework 的那部分尚未移植到.NET Core 2.0 中。目前正在实施中。请参阅:Port System.Diagnostics.EventLog to .NET Core,这是将更多 System.Diagnostics 命名空间引入 .NET Core 的持续努力的一部分。 EventLog 将在 v2.1.0 中发布。
不知道System.Diagnostics.Eventing.Reader
出货的具体版本
System.Diagnostics.EventLog
被重定向到 Linux 上的 syslog
。也应该支持读取日志
我目前正在开发一个 C# 应用程序,它可以使用以下导入读取和查询 Windows 事件日志:
using System.Diagnostics.Eventing.Reader;
此导入在我的 Windows 10 笔记本电脑上运行良好,使用 Visual Studio 2017。但是,我收到以下错误 运行 此导入 dotnet run
并在mcs
:
Program.cs(3,26): error CS0234: The type or namespace name `Eventing' does not
exist in the namespace `System.Diagnostics'. Are you missing an assembly
reference? Compilation failed: 1 error(s), 0 warnings
我已经在 Mac OS X 笔记本电脑和 mono Docker container. It seems like it should work on Mac and Linux since I found the code on their GitHub repository 上尝试过编译。有人知道吗?我一直在尝试寻找 dll
或导入来完成这项工作,但到目前为止没有成功。任何帮助将不胜感激。
.NET Framework 的那部分尚未移植到.NET Core 2.0 中。目前正在实施中。请参阅:Port System.Diagnostics.EventLog to .NET Core,这是将更多 System.Diagnostics 命名空间引入 .NET Core 的持续努力的一部分。 EventLog 将在 v2.1.0 中发布。
不知道System.Diagnostics.Eventing.Reader
出货的具体版本
System.Diagnostics.EventLog
被重定向到 Linux 上的 syslog
。也应该支持读取日志