【问题标题】:ReSharper not linked in EndpointConfig.cs for NServiceBus hostReSharper 未在 NServiceBus 主机的 EndpointConfig.cs 中链接
【发布时间】:2017-03-06 13:18:21
【问题描述】:

显然

在查看由 NServiceBus 主机生成的 EndpointConfig.cs 文件时,

Alt+Enter 不起作用。

顺便说一句,Ctrl+; 也没有...

我要做什么

我需要对存在于不同命名空间中的 classinterface 的引用,之前尚未引用。我希望能够使用 ReSharper。

症状

类名和接口名都用红色波浪线下划线,但不是用红色写的:

应该是:

在任何其他文件中,不是EndpointConfig.cs,ReSharper 正常工作,只是不在这个特定文件中。

如果我将 EndpointConfig.cs 重命名为其他名称,一切都会按预期进行。

就像 ReSharper 被硬连线到不触摸 EndpointConfig.cs

发生了什么事?

PS:EndpointConfig.cs是添加NServiceBus主机时自动生成的。

【问题讨论】:

标签: c# .net resharper nservicebus


【解决方案1】:

ReSharper 不会扫描作为 nuget 的一部分提供的文件。当您重命名文件时,ReSharper 不再检测到它是从 nuget 发出的,因此它会开始正确扫描该文件。我不知道是否可以改变这种行为。

我可以建议的最佳选择是self hosting NServiceBus in a windows service。这是runnable sample

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-10-16
    • 2018-12-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多