Exception 为NUnit构建的测试dll“;“不是NUnit测试”;(包括答覆)

Exception 为NUnit构建的测试dll“;“不是NUnit测试”;(包括答覆),exception,testing,nunit,Exception,Testing,Nunit,关于在输出窗口中获取此信息,还有很多问题。他们的答案涉及GAC和dll版本。我的回答是针对我的情况的,尽管它表现出同样的症状 输出窗口-测试 'E:\CodeRepository-Git\DFBAzure\AzureMgmtServiceDashboard\Wp7AzureMgmt.DashboardFeeds.Test\bin\Debug\Wp7AzureMgmt.DashboardFeeds.Test.dll' is not a NUnit Test 我的问题是App.config对已知密

关于在输出窗口中获取此信息,还有很多问题。他们的答案涉及GAC和dll版本。我的回答是针对我的情况的,尽管它表现出同样的症状

输出窗口-测试

'E:\CodeRepository-Git\DFBAzure\AzureMgmtServiceDashboard\Wp7AzureMgmt.DashboardFeeds.Test\bin\Debug\Wp7AzureMgmt.DashboardFeeds.Test.dll' is not a NUnit Test
我的问题是App.config对已知密钥的值格式不正确。我已经在mvcweb.config中更正了这个问题,但忘记在test.dll中修复它

当我试图从NUnit gui运行dll时(项目确实加载了),gui抛出了一个未处理的异常。详情如下:

 See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.Configuration.ConfigurationErrorsException: Configuration system failed to initialize ---> System.Configuration.ConfigurationErrorsException: The configSource attribute must be a relative physical path, so the '/' character is not allowed. (E:\CodeRepository-Git\DFBAzure\AzureMgmtServiceDashboard\Wp7AzureMgmt.DashboardFeeds.Test\bin\Debug\Wp7AzureMgmt.DashboardFeeds.Test.dll.config line 12)
   at System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean ignoreLocal)
   at System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(ConfigurationSchemaErrors schemaErrors)
   at System.Configuration.ClientConfigurationSystem.EnsureInit(String configKey)
   --- End of inner exception stack trace ---

Server stack trace: 
   at System.Configuration.ClientConfigurationSystem.EnsureInit(String configKey)
   at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(String sectionName)
   at System.Configuration.ConfigurationManager.GetSection(String sectionName)
   at System.Configuration.PrivilegedConfigurationManager.GetSection(String sectionName)
   at System.Net.Configuration.SettingsSectionInternal.get_Section()
   at System.Net.Sockets.Socket.InitializeSockets()
   at System.Net.IPAddress.InternalParse(String ipString, Boolean tryParse)
   at System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink..ctor(String channelURI, TcpClientChannel channel)
   at System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSinkProvider.CreateSink(IChannelSender channel, String url, Object remoteChannelData)
   at System.Runtime.Remoting.Channels.BinaryClientFormatterSinkProvider.CreateSink(IChannelSender channel, String url, Object remoteChannelData)
   at System.Runtime.Remoting.Channels.Tcp.TcpClientChannel.CreateMessageSink(String url, Object remoteChannelData, String& objectURI)
   at System.Runtime.Remoting.RemotingConfigHandler.FindDelayLoadChannelForCreateMessageSink(String url, Object data, String& objectURI)
   at System.Runtime.Remoting.RemotingServices.CreateEnvoyAndChannelSinks(MarshalByRefObject tpOrObject, ObjRef objectRef, IMessageSink& chnlSink, IMessageSink& envoySink)
   at System.Runtime.Remoting.RemotingServices.InternalUnmarshal(ObjRef objectRef, Object proxy, Boolean fRefine)
   at System.Runtime.Remoting.ObjRef.GetRealObjectHelper()
   at System.Runtime.Serialization.ObjectManager.ResolveObjectReference(ObjectHolder holder)
   at System.Runtime.Serialization.ObjectManager.DoFixups()
   at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
   at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
   at System.Runtime.Remoting.Channels.CrossAppDomainSerializer.DeserializeObject(MemoryStream stm)
   at System.Runtime.Remoting.Messaging.SmuggledMethodCallMessage.FixupForNewAppDomain()
   at System.Runtime.Remoting.Channels.CrossAppDomainSink.DoDispatch(Byte[] reqStmBuff, SmuggledMethodCallMessage smuggledMcm, SmuggledMethodReturnMessage& smuggledMrm)
   at System.Runtime.Remoting.Channels.CrossAppDomainSink.DoTransitionDispatchCallback(Object[] args)

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 NUnit.Core.TestRunner.BeginRun(EventListener listener, ITestFilter filter, Boolean captureTrace, LoggingThreshold logLevel)
   at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
   at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)

Exception rethrown at [1]: 
   at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
   at NUnit.Core.TestRunner.BeginRun(EventListener listener, ITestFilter filter, Boolean captureTrace, LoggingThreshold logLevel)
   at NUnit.Core.ProxyTestRunner.BeginRun(EventListener listener, ITestFilter filter, Boolean tracing, LoggingThreshold logLevel)
   at NUnit.Util.TestLoader.RunTests(ITestFilter filter)
   at NUnit.UiKit.TestSuiteTreeView.RunTests(ITest[] tests, Boolean ignoreCategories)
   at NUnit.Gui.NUnitForm.runButton_Click(Object sender, EventArgs e)
   at System.Windows.Forms.Control.OnClick(EventArgs e)
   at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ButtonBase.WndProc(Message& m)
   at System.Windows.Forms.Button.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5456 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework64/v2.0.50727/mscorlib.dll
----------------------------------------
nunit
    Assembly Version: 2.6.0.12051
    Win32 Version: 2.6.0.12051
    CodeBase: file:///C:/Program%20Files%20(x86)/NUnit%202.6/bin/nunit.exe
----------------------------------------
nunit-gui-runner
    Assembly Version: 2.6.0.12051
    Win32 Version: 2.6.0.12051
    CodeBase: file:///C:/Program%20Files%20(x86)/NUnit%202.6/bin/lib/nunit-gui-runner.DLL
----------------------------------------
nunit.core
    Assembly Version: 2.6.0.12051
    Win32 Version: 2.6.0.12051
    CodeBase: file:///C:/Program%20Files%20(x86)/NUnit%202.6/bin/lib/nunit.core.DLL
----------------------------------------
nunit.util
    Assembly Version: 2.6.0.12051
    Win32 Version: 2.6.0.12051
    CodeBase: file:///C:/Program%20Files%20(x86)/NUnit%202.6/bin/lib/nunit.util.DLL
----------------------------------------
nunit.core.interfaces
    Assembly Version: 2.6.0.12051
    Win32 Version: 2.6.0.12051
    CodeBase: file:///C:/Program%20Files%20(x86)/NUnit%202.6/bin/lib/nunit.core.interfaces.DLL
----------------------------------------
nunit.uikit
    Assembly Version: 2.6.0.12051
    Win32 Version: 2.6.0.12051
    CodeBase: file:///C:/Program%20Files%20(x86)/NUnit%202.6/bin/lib/nunit.uikit.DLL
----------------------------------------
System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5456 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5456 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5458 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
System.Configuration
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
System.Runtime.Remoting
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5420 (Win7SP1.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll
----------------------------------------
nunit.uiexception
    Assembly Version: 2.6.0.12051
    Win32 Version: 2.6.0.12051
    CodeBase: file:///C:/Program%20Files%20(x86)/NUnit%202.6/bin/lib/nunit.uiexception.DLL
----------------------------------------
System.Web
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.5456 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_64/System.Web/2.0.0.0__b03f5f7f11d50a3a/System.Web.dll
----------------------------------------
vg5zflea
    Assembly Version: 2.6.0.12051
    Win32 Version: 2.0.50727.5456 (Win7SP1GDR.050727-5400)
    CodeBase: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.
有关调用的详细信息,请参阅此消息的结尾
即时(JIT)调试,而不是此对话框。
**************例外文本**************
System.Configuration.ConfigurationErrorsException:配置系统未能初始化-->System.Configuration.ConfigurationErrorsException:configSource属性必须是相对物理路径,因此不允许使用“/”字符。(E:\code存储库Git\DFBAzure\azuremgmts服务仪表板\Wp7AzureMgmt.DashboardFeeds.Test\bin\Debug\Wp7AzureMgmt.DashboardFeeds.Test.dll.config第12行)
在System.Configuration.ConfigurationSchemaErrors.Throwiferors(布尔ignoreLocal)
在System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(ConfigurationSchemaErrors schemaErrors)中
位于System.Configuration.ClientConfigurationSystem.EnsureInit(字符串configKey)
---内部异常堆栈跟踪的结束---
服务器堆栈跟踪:
位于System.Configuration.ClientConfigurationSystem.EnsureInit(字符串configKey)
位于System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(字符串sectionName)
位于System.Configuration.ConfigurationManager.GetSection(字符串sectionName)
位于System.Configuration.PrivilegedConfiguration Manager.GetSection(String sectionName)
在System.Net.Configuration.SettingsSectionInternal.get_节()中
在System.Net.Sockets.Socket.InitializeSockets()中
在System.Net.IPAddress.InternalParse(字符串ipString,布尔型tryParse)
在System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink..ctor(字符串通道URI,TcpClientChannel通道)
在System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSinkProvider.CreateSink(IChannelSender通道、字符串url、对象remoteChannelData)
在System.Runtime.Remoting.Channels.BinaryClientFormatterSinkProvider.CreateSink(IChannelSender通道、字符串url、对象remoteChannelData)
在System.Runtime.Remoting.Channels.Tcp.TcpClientChannel.CreateMessageSink(字符串url、对象remoteChannelData、字符串和对象URI)
位于System.Runtime.Remoting.RemotingConfigHandler.FindDelayLoadChannelForCreateMessageSink(字符串url、对象数据、字符串和对象URI)
在System.Runtime.Remoting.RemotingServices.CreateEnvoyAndChannelSinks(MarshalByRefObject tpOrObject、ObjRef objectRef、IMessageSink和chnlSink、IMessageSink和envoySink)
在System.Runtime.Remoting.RemotingServices.InternalUnmarshal(ObjRef objectRef,对象代理,布尔值)
在System.Runtime.Remoting.ObjRef.GetRealObjectHelper()中
位于System.Runtime.Serialization.ObjectManager.ResolveObjectReference(ObjectHolder)
在System.Runtime.Serialization.ObjectManager.DoFixups()中
在System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler处理程序、\uu BinaryParser serParser、Boolean fCheck、Boolean isCrossAppDomain、IMethodCallMessage方法CallMessage)
在System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(流序列化流、HeaderHandler处理程序、布尔fCheck、布尔isCrossAppDomain、IMethodCallMessage方法CallMessage)
在System.Runtime.Remoting.Channel.CrossAppDomainSerializer.DeserializeObject(MemoryStream stm)中
在System.Runtime.Remoting.Messaging.SnockedMethodCallMessage.FixupForNewAppDomain()中
在System.Runtime.Remoting.Channels.CrossAppDomainSink.DoDispatch(字节[]reqStmBuff,走私方法CallMessage走私DMCM,走私方法ReturnMessage&走私DMRM)
在System.Runtime.Remoting.Channels.CrossAppDomainSink.DotTransitionDispatchCallback(对象[]参数)处
在[0]处重试异常:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg,IMessage retMsg)
at System.Runtime.Remoting.proxy.RealProxy.PrivateInvoke(MessageData&msgData,Int32类型)
在NUnit.Core.TestRunner.BeginRun(EventListener侦听器、ITestFilter筛选器、Boolean captureTrace、LoggingThreshold logLevel)
在System.Runtime.Remoting.Messaging.StackBuilderSink.\u PrivateProcessMessage(IntPtr md,对象[]参数,对象服务器,对象[]和输出参数)
在System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg)中
[1]处的异常重试:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg,IMessage retMsg)
at System.Runtime.Remoting.proxy.RealProxy.PrivateInvoke(MessageData&msgData,Int32类型)
在NUnit.Core.TestRunner.BeginRun(EventListener侦听器、ITestFilter筛选器、Boolean captureTrace、LoggingThreshold logLevel)
在NUnit.Core.ProxyTestRunner.BeginRun(EventListener侦听器、ITestFilter筛选器、布尔跟踪、LoggingThreshold日志级别)
在NUnit.Util.TestLoader.RunTests(ITestFilter)上
在NUnit.UiKit.TestSuiteTreeView.RunTests(ITest[]测试,布尔IGNORECATEGORES)
在NUnit.Gui.NUnitForm.runButton\u处单击(对象发送方,事件参数e)
在System.Windows.Forms.Control.OnClick(EventArgs e)中
在System.Windows.Forms.Button.OnMouseUp(MouseEventArgs-mevent)上
在System.Windows.Forms.Control.WmMouseUp(Message&m、MouseButtons按钮、Int32单击)
位于System.Windows.Forms.Control.WndProc(Message&m)
位于System.Windows.Forms.ButtonBase.WndProc(Message&m)
在System.Windows.Forms.Button.WndProc(Message&m)中
在System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message&m)中
在System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd、Int32 msg、IntPtr wparam、IntPtr lparam)中
The configSource attribute must be a relative physical path, so the '/' character is not allowed.