Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2012/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 为什么赢了';我的nunit测试是否在visual studio 2012中运行?_C#_Visual Studio 2012_Unity3d_Nunit_Mstest - Fatal编程技术网

C# 为什么赢了';我的nunit测试是否在visual studio 2012中运行?

C# 为什么赢了';我的nunit测试是否在visual studio 2012中运行?,c#,visual-studio-2012,unity3d,nunit,mstest,C#,Visual Studio 2012,Unity3d,Nunit,Mstest,我有一个项目,用一些.NET3.5C代码构建一个DLL,用于unity3d项目。在同一个解决方案中,我有一个构建包含NUnit测试的dll的项目。我可以在xamarin studio中运行这些测试,但无法在xamarin studio中正确调试它们。我试图在VisualStudio中构建和运行测试,在那里我将能够调试它们 我下载了NUnit测试适配器,确保两个项目都针对任何CPU和相同版本的.NET framework。我还试着瞄准x86。如果我尝试以x64为目标,则测试资源管理器中不会显示任何

我有一个项目,用一些.NET3.5C代码构建一个DLL,用于unity3d项目。在同一个解决方案中,我有一个构建包含NUnit测试的dll的项目。我可以在xamarin studio中运行这些测试,但无法在xamarin studio中正确调试它们。我试图在VisualStudio中构建和运行测试,在那里我将能够调试它们

我下载了NUnit测试适配器,确保两个项目都针对任何CPU和相同版本的.NET framework。我还试着瞄准x86。如果我尝试以x64为目标,则测试资源管理器中不会显示任何测试


所有测试都不会运行。如果我开始调试,它会在几秒钟后停止。如何让这些测试在VisualStudio中运行?这些测试不调用unity函数。我尝试测试的dll(不是包含测试的dll)引用unity引擎dll。我看到这会导致问题,但测试在Xamarin studio中运行良好。如果我开始运行测试,则在测试运行失败后,我会在输出窗口中看到以下内容:

'vstest.executionengine.x86.clr20.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll'
'vstest.executionengine.x86.clr20.exe' (Managed (v2.0.50727)): Loaded 'C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 11.0\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\TESTWINDOW\vstest.executionengine.x86.clr20.exe'
'vstest.executionengine.x86.clr20.exe' (Managed (v2.0.50727)): Loaded 'C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 11.0\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\TESTWINDOW\Microsoft.VisualStudio.TestPlatform.TestExecutor.Core.dll'
'vstest.executionengine.x86.clr20.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll'
'vstest.executionengine.x86.clr20.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll'
'vstest.executionengine.x86.clr20.exe' (Managed (v2.0.50727)): Loaded 'C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 11.0\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\TESTWINDOW\Microsoft.VisualStudio.TestPlatform.Core.dll'
'vstest.executionengine.x86.clr20.exe' (Managed (v2.0.50727)): Loaded 'C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 11.0\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\TESTWINDOW\Microsoft.VisualStudio.TestPlatform.ObjectModel.dll'
'vstest.executionengine.x86.clr20.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll'
'vstest.executionengine.x86.clr20.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll'
'vstest.executionengine.x86.clr20.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Runtime.Serialization\3.0.0.0__b77a5c561934e089\System.Runtime.Serialization.dll'
'vstest.executionengine.x86.clr20.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\assembly\GAC_MSIL\SMDiagnostics\3.0.0.0__b77a5c561934e089\SMDiagnostics.dll'
'vstest.executionengine.x86.clr20.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll'
'vstest.executionengine.x86.clr20.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\assembly\GAC_MSIL\System.WorkflowServices\3.5.0.0__31bf3856ad364e35\System.WorkflowServices.dll'
'vstest.executionengine.x86.clr20.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\assembly\GAC_MSIL\System.ServiceModel.Web\3.5.0.0__31bf3856ad364e35\System.ServiceModel.Web.dll'
'vstest.executionengine.x86.clr20.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.Diagnostics.ServiceModelSink\3.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Diagnostics.ServiceModelSink.dll'
A first chance exception of type 'System.Configuration.ConfigurationErrorsException' occurred in System.Configuration.dll
A first chance exception of type 'System.Configuration.ConfigurationErrorsException' occurred in System.Configuration.dll
'vstest.executionengine.x86.clr20.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\assembly\GAC_MSIL\System.IdentityModel\3.0.0.0__b77a5c561934e089\System.IdentityModel.dll'
'vstest.executionengine.x86.clr20.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\assembly\GAC_MSIL\System.Core\3.5.0.0__b77a5c561934e089\System.Core.dll'
'vstest.executionengine.x86.clr20.exe' (Managed (v2.0.50727)): Loaded 'C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 11.0\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\TESTWINDOW\Microsoft.VisualStudio.TestPlatform.Utilities.dll'
'vstest.executionengine.x86.clr20.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.Diagnostics.Measurement\11.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.Diagnostics.Measurement.dll'
'vstest.executionengine.x86.clr20.exe' (Managed (v2.0.50727)): Loaded 'C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 11.0\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\TESTWINDOW\Extensions\Microsoft.VisualStudio.TestPlatform.Extensions.dll'
A first chance exception of type 'System.BadImageFormatException' occurred in mscorlib.dll
A first chance exception of type 'System.BadImageFormatException' occurred in mscorlib.dll
A first chance exception of type 'System.BadImageFormatException' occurred in mscorlib.dll
A first chance exception of type 'System.BadImageFormatException' occurred in mscorlib.dll
'vstest.executionengine.x86.clr20.exe' (Managed (v2.0.50727)): Loaded 'C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 11.0\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\TESTWINDOW\Extensions\Microsoft.VisualStudio.TestPlatform.Extensions.TmiAdapter.dll'
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
'vstest.executionengine.x86.clr20.exe' (Managed (v2.0.50727)): Loaded 'C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PrivateAssemblies\Microsoft.VisualStudio.TeamSystem.Licensing.dll'
'vstest.executionengine.x86.clr20.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.QualityTools.Common\11.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.QualityTools.Common.dll'
'vstest.executionengine.x86.clr20.exe' (Managed (v2.0.50727)): Loaded 'C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 11.0\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\TESTWINDOW\Extensions\Microsoft.VisualStudio.TestPlatform.Extensions.TrxLogger.dll'
'vstest.executionengine.x86.clr20.exe' (Managed (v2.0.50727)): Loaded 'C:\PROGRAM FILES (X86)\MICROSOFT VISUAL STUDIO 11.0\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\TESTWINDOW\Extensions\Microsoft.VisualStudio.TestPlatform.Extensions.VSTestIntegration.dll'
'vstest.executionengine.x86.clr20.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.QualityTools.UnitTestFramework\10.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll'
'vstest.executionengine.x86.clr20.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll'
A first chance exception of type 'System.BadImageFormatException' occurred in mscorlib.dll
A first chance exception of type 'System.BadImageFormatException' occurred in mscorlib.dll
A first chance exception of type 'System.BadImageFormatException' occurred in mscorlib.dll
A first chance exception of type 'System.BadImageFormatException' occurred in mscorlib.dll
A first chance exception of type 'System.BadImageFormatException' occurred in mscorlib.dll
A first chance exception of type 'System.BadImageFormatException' occurred in mscorlib.dll
A first chance exception of type 'System.BadImageFormatException' occurred in mscorlib.dll
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
A first chance exception of type 'System.IO.FileNotFoundException' occurred in mscorlib.dll
'vstest.executionengine.x86.clr20.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\assembly\GAC_32\System.Transactions\2.0.0.0__b77a5c561934e089\System.Transactions.dll'
'vstest.executionengine.x86.clr20.exe' (Managed (v2.0.50727)): Loaded 'C:\Windows\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll'
A first chance exception of type 'System.ComponentModel.Win32Exception' occurred in System.ServiceModel.dll
The thread '<No Name>' (0x1ffc) has exited with code 0 (0x0).
A first chance exception of type 'System.InvalidOperationException' occurred in Microsoft.VisualStudio.TestPlatform.TestExecutor.Core.dll
A first chance exception of type 'System.InvalidOperationException' occurred in Microsoft.VisualStudio.TestPlatform.TestExecutor.Core.dll
A first chance exception of type 'System.ServiceModel.CommunicationObjectAbortedException' occurred in System.ServiceModel.dll
A first chance exception of type 'System.ServiceModel.CommunicationObjectAbortedException' occurred in System.ServiceModel.dll
A first chance exception of type 'System.ServiceModel.CommunicationObjectAbortedException' occurred in System.ServiceModel.dll
A first chance exception of type 'System.IO.IOException' occurred in System.dll
The program '[5652] vstest.executionengine.x86.clr20.exe: Managed (v2.0.50727)' has exited with code 0 (0x0).
The program '[5652] vstest.executionengine.x86.clr20.exe: Program Trace' has exited with code 0 (0x0).
'vstest.executionengine.x86.clr20.exe'(托管(v2.0.50727)):加载的'C:\Windows\assembly\GAC_32\mscorlib\2.0.0.0\uuu\b77a5c561934e089\mscorlib.dll'
'vstest.executionengine.x86.clr20.exe'(托管(v2.0.50727)):加载'C:\PROGRAM FILES(x86)\MICROSOFT VISUAL STUDIO 11.0\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\TESTWINDOW\vstest.executionengine.x86.clr20.exe'
'vstest.executionengine.x86.clr20.exe'(托管(v2.0.50727)):加载'C:\PROGRAM FILES(x86)\MICROSOFT VISUAL STUDIO 11.0\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\TESTWINDOW\MICROSOFT.VisualStudio.TestPlatform.TestExecutor.Core.dll'
'vstest.executionengine.x86.clr20.exe'(托管(v2.0.50727)):加载'C:\Windows\assembly\GAC_MSIL\System\2.0.0.0_ub77a5c561934e089\System.dll'
'vstest.executionengine.x86.clr20.exe'(托管(v2.0.50727)):加载的'C:\Windows\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0_uub77a5c561934e089\System.ServiceModel.dll'
'vstest.executionengine.x86.clr20.exe'(托管(v2.0.50727)):加载'C:\PROGRAM FILES(x86)\MICROSOFT VISUAL STUDIO 11.0\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\TESTWINDOW\MICROSOFT.VisualStudio.TestPlatform.Core.dll'
'vstest.executionengine.x86.clr20.exe'(托管(v2.0.50727)):加载'C:\PROGRAM FILES(x86)\MICROSOFT VISUAL STUDIO 11.0\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\TESTWINDOW\MICROSOFT.VisualStudio.TestPlatform.ObjectModel.dll'
'vstest.executionengine.x86.clr20.exe'(托管(v2.0.50727)):加载'C:\Windows\assembly\GAC\u MSIL\System.Configuration\2.0.0\uu b03f5f7f11d50a3a\System.Configuration.dll'
'vstest.executionengine.x86.clr20.exe'(托管(v2.0.50727)):加载'C:\Windows\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll'
'vstest.executionengine.x86.clr20.exe'(托管(v2.0.50727)):加载的'C:\Windows\assembly\GAC_MSIL\System.Runtime.Serialization\3.0.0.0_uuub77a5c561934e089\System.Runtime.Serialization.dll'
'vstest.executionengine.x86.clr20.exe'(托管(v2.0.50727)):加载'C:\Windows\assembly\GAC_MSIL\SMDiagnostics\3.0.0.0_uub77a5c561934e089\SMDiagnostics.dll'
'vstest.executionengine.x86.clr20.exe'(托管(v2.0.50727)):加载'C:\Windows\assembly\GAC\u 32\System.Web\2.0.0.0\uu b03f5f7f11d50a3a\System.Web.dll'
'vstest.executionengine.x86.clr20.exe'(托管(v2.0.50727)):加载'C:\Windows\assembly\GAC\u MSIL\System.WorkflowServices\3.5.0.0\uu\31bf3856ad364e35\System.WorkflowServices.dll'
'vstest.executionengine.x86.clr20.exe'(托管(v2.0.50727)):加载的'C:\Windows\assembly\GAC_MSIL\System.ServiceModel.Web\3.5.0.0\uu\31bf3856ad364e35\System.ServiceModel.Web.dll'
'vstest.executionengine.x86.clr20.exe'(托管(v2.0.50727)):加载'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.Diagnostics.ServiceModelSink\3.0.0.0_uB03F5F7F11D50A3A\Microsoft.VisualStudio.Diagnostics.ServiceModelSink.dll'
System.Configuration.dll中发生了类型为“System.Configuration.ConfigurationErrorsException”的首次意外异常
System.Configuration.dll中发生了类型为“System.Configuration.ConfigurationErrorsException”的首次意外异常
'vstest.executionengine.x86.clr20.exe'(托管(v2.0.50727)):加载'C:\Windows\assembly\GAC_MSIL\System.IdentityModel\3.0.0.0\uuuu b77a5c561934e089\System.IdentityModel.dll'
'vstest.executionengine.x86.clr20.exe'(托管(v2.0.50727)):加载'C:\Windows\assembly\GAC_MSIL\System.Core\3.5.0.0_uub77a5c561934e089\System.Core.dll'
'vstest.executionengine.x86.clr20.exe'(托管(v2.0.50727)):加载'C:\PROGRAM FILES(x86)\MICROSOFT VISUAL STUDIO 11.0\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\TESTWINDOW\MICROSOFT.VisualStudio.TestPlatform.Utilities.dll'
'vstest.executionengine.x86.clr20.exe'(托管(v2.0.50727)):加载'C:\Windows\assembly\GAC_MSIL\Microsoft.VisualStudio.Diagnostics.Measurement\11.0.0.0_uB03F5F7F11D50A3A\Microsoft.VisualStudio.Diagnostics.Measurement.dll'
'vstest.executionengine.x86.clr20.exe'(托管(v2.0.50727)):加载'C:\PROGRAM FILES(x86)\MICROSOFT VISUAL STUDIO 11.0\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\TESTWINDOW\Extensions\MICROSOFT.VisualStudio.TestPlatform.Extensions.dll'
mscorlib.dll中发生类型为“System.BadImageFormatException”的第一次意外异常
mscorlib.dll中发生类型为“System.BadImageFormatException”的第一次意外异常
mscorlib.dll中发生类型为“System.BadImageFormatException”的第一次意外异常
mscorlib.dll中发生类型为“System.BadImageFormatException”的第一次意外异常
“vstest.executionengine.x86.clr20.exe”(托管(v2.0.50727)):加载的“C:\PROGRAM FILES(x86)\MICROSOFT VISUAL STUDIO 11.0\COMMON7\IDE\COMMONEXTENSIONS\MICROSOFT\TESTWINDOW\Extensions\MICROSOFT.VisualStudio.TestPlatform.Extensions.TmiAdapter.dll”
mscorlib.dll中发生“System.IO.FileNotFoundException”类型的第一次意外异常
'vstest.executionengine.x86.clr20.exe'(托管(v2.0.50727)):加载的'C:\Program Files(x86)\Microsoft Visual Studio 11.0\Common7\IDE\Priva