【问题标题】:Why is this remoting service not found only when running mspec.exe?为什么只有在运行 mspec.exe 时才找到此远程服务?
【发布时间】:2013-04-08 16:00:34
【问题描述】:

只有在使用 mspec.exe 运行测试时才会发生这种情况。它们在 ReSharper 的测试运行器中运行良好。 EstablishBecause 语句执行,然后在到达第一个 It 语句后立即出现以下异常。

System.Runtime.Remoting.RemotingException occurred
Message=Requested Service not found
Source=System.Runtime.Remoting
StackTrace:
  Server stack trace: 
     at System.Runtime.Remoting.Channels.BinaryServerFormatterSink.ProcessMessage    (IServerChannelSinkStack sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream requestStream, IMessage& responseMsg, ITransportHeaders& responseHeaders, Stream& responseStream)
Exception rethrown at [0]: 
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at Machine.Specifications.Runner.ISpecificationRunListener.OnSpecificationStart(SpecificationInfo specification)
   at Machine.Specifications.Runner.Impl.AggregateRunListener.<>c__DisplayClass11.<OnSpecificationStart>b__10(ISpecificationRunListener listener) in c:\OLDMSPEC\machine-machine.specifications-98b543c\Source\Machine.Specifications\Runner\Impl\AggregateRunListener.cs:line 49

我尝试了这里所说的但没有用:Spec fails when run by mspec.exe, but passes when run by TD.NET

我想要一些一般性的想法,因为代码分为很多类并且有很多步骤,所以我很难提供示例代码。

【问题讨论】:

    标签: resharper remoting mspec


    【解决方案1】:

    我从未遇到过 Requested Service not found 错误,我真的不知道是什么原因造成的。如果您的代码在特定版本上中断(并且之前一直在工作),那么复制将非常棒并提供一些信息。 ReSharper 和控制台运行程序之间存在一些根本区别,即 ReSharper 使用自定义远程处理工具,而控制台运行程序使用 vanilla .NET 远程处理。我知道这可能很困难,但是能够隔离问题的复制会很棒。 (我目前正在休假,从 4 月 20 日起可以提供帮助。)

    【讨论】:

      【解决方案2】:

      我们有一个自定义的远程运行器。以下线程帮助我解决了这个问题。 Requested Service not found

      亚历山大,感谢您的帮助。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2020-05-31
        • 2015-11-03
        相关资源
        最近更新 更多