【发布时间】:2013-04-08 16:00:34
【问题描述】:
只有在使用 mspec.exe 运行测试时才会发生这种情况。它们在 ReSharper 的测试运行器中运行良好。 Establish 和 Because 语句执行,然后在到达第一个 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
我想要一些一般性的想法,因为代码分为很多类并且有很多步骤,所以我很难提供示例代码。
【问题讨论】: