- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我基于这个 example 创建了我的事件源.我的事件源如下所示:
[EventSource(Name = "Samples-EventSourceDemos-EventLog")]
public sealed class MinimalEventSource : EventSource
{
public static MinimalEventSource Log = new MinimalEventSource();
[Event(1, Message = "{0} -> {1}", Channel = EventChannel.Admin)]
public void Load(long baseAddress, string imageName)
{
WriteEvent(1, baseAddress, imageName);
}
}
该示例使用代码来模拟安装/卸载过程。从其他一些 SO 问题中,我看到了另一个 example使用事件消息文件安装事件源。
但它缺少一些很好的示例,说明如何安装/注册由 list 定义的 EventSource。我正在调查使用 CustomAction 来做类似的事情:
wevtutil.exe im <EtwManifestManFile> /rf:"EtwManifestDllFile" /mf:"EtwManifestDllFile"
但想知道您是否有任何建议?
最佳答案
经过一番搜索后发现。在 WixUtilExtension 中,有内置支持。引用它并添加命名空间后,这很容易。
以下是 Product.wxs 中的更改:
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
...
<Component Id="etwManifest.dll">
<File Id="etwManifest.dll" KeyPath="yes"
Source="$(var.SampleClassLibrary.TargetDir)\SampleClassLibrary.Samples-EventSourceDemos-EventLog.etwManifest.dll" />
</Component>
<Component Id="etwManifest.man">
<File Id="etwManifest.man" KeyPath="yes"
Source="$(var.SampleClassLibrary.TargetDir)\SampleClassLibrary.Samples-EventSourceDemos-EventLog.etwManifest.man">
<util:EventManifest MessageFile="[etwManifest.dll]" ResourceFile="[etwManifest.dll]"></util:EventManifest>
</File>
</Component>
</Wix>
我必须做的唯一技巧是减少组件 ID 和文件 ID(用于与文件名匹配)的长度以避免以下错误:错误 25540。配置 XML 文件时失败。
关于c# - WiX 安装 EventSource,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22822183/
我正在使用 https://github.com/streamdataio/eventsource-android/ 的 EventSource REPO我创建了一个 onConnect ();方法,
我正在开发一个由三个 Windows 服务和几个普通 Windows 应用程序 (.exe) 组成的大型产品。现在我们要转移到 ETW 和语义日志记录,并使用 Microsoft.Diagnostic
我正在研究使用 DDD+CQRS+EventSourcing 制作应用程序,但在弄清楚如何进行用户身份验证时遇到了一些麻烦。 用户本质上是我领域的一部分,因为他们对客户负责。我正在使用 ASP.NET
从 EventSource 开始API 我写的最学术的例子。 问题是我总是出错,我找不到任何有用的信息。当我加载 home.html , JS 脚本停在 source.onerror ;我将它打印到控
我不知道如何使用 JavaScript 从 EventSource 捕获事件。我正在这样做,但是“正在运行”永远不会出现在控制台中。 var es = new EventSource(
我创建了一个自托管 ServiceStack 服务,该服务基于其 showcase chat application 在 Windows 服务中运行。 。 但是,我没有进一步讨论的是尝试将客户端编写为
我正在使用 EventSource 登录到 ETW。我们正在使用 .Net Framework 4.5。 由于我处于开发的初级阶段,我将经常更改我的 EventSource 子类中的方法签名。我真的不
我正在使用 EventSource 在我的库中记录事件。该库是跨平台的,这意味着它可以被 linux/mac 用户使用。我知道 EventSource 在 Windows 上是如何工作的。用户可以使用
对 EventSource 行为有点困惑。 它连接良好并保持连接状态,直到收到第一条消息。 当我发送一条 data: something\n\n 消息时,连接断开并创建新连接。 使用 Content-
我在项目前端使用 JavaScript EventSource。 有时,浏览器和服务器之间的连接失败或服务器崩溃。在这些情况下,EventSource 会在 3 秒后尝试重新连接,如文档中所述。 但它
我正在尝试创建一个页面,该页面使用 EvenSource 对象(在 javascript 中)来创建服务器发送事件( cometd )。我阅读了很多关于它的教程,但没有找到可以解释以下问题的教程: 当
我正在尝试在我的新项目中使用 CQRS 和 EventSorcing。我正在遵循 Greg Young 几年前建议的方式(Mark Nijhof 实现 - http://cre8ivethought.
我有一个使用 EventSourcing 的 DDD 项目。目前有许多聚合根,其中许多都有实体的集合。甚至更多 - 一些实体具有其他实体的集合。 问题:出于审计目的读取 EventSourcing 事
我正在尝试为 Yesod 中的网站构建聊天功能,我希望它有一个所有已连接用户的列表。我认为最好的方法是将人员添加到连接上的用户列表中,并在他们离开时将其删除。如果保持连接打开,响应似乎应该阻塞,所以我
我有一个用例,我想发布一个非状态更改事件作为触发器。 In the vast majority of cases, the Aggregates will publish events by ap
我正在尝试使用 dddd 实现一个事件源系统。目前,我正在努力了解我的事件如何以及在何处跨越限界上下文的边界。 假设有两个限界上下文: 产品管理 物流系统 产品管理拥有关于产品的所有知识。为了简化,它
TL;DR 更新:无论是从客户端关闭 EventSource 还是完全关闭客户端,php 都会继续在后端执行并且无法报告 connection_aborted() 的正确值.为什么会这样? 我一直在
我正在尝试实现 Server Sent Events使用 Spring SseEmitter如本 Youtube video 中所述. 我能够启动事件流并从服务器发送的事件中接收数据。 但是,我可以看
我正在实现 FullCalendar 作为我的团队的假期日历。我希望团队中的每个成员的项目都有不同的颜色,因此我使用 ajax 请求从数据库中提取列表。我想知道如何将此列表组合到事件数组中以创建 ev
刚刚将我的 fullcalendar 更新到 1.6.3,将 jQuery 更新到 1.10.2突然我的日历不再显示来自“eventSources”的事件。我在文档中找不到任何说明需要更改的内容。为了
我是一名优秀的程序员,十分优秀!