NUnit与Windows7 for C++/CLI?

NUnit与Windows7 for C++/CLI?,nunit,c++-cli,Nunit,C++ Cli,NUnit在C++/CLI中失败,出现System.IO.FileNotFoundException 我尝试了自己新创建的项目,NUnit附带的C++/CLI示例,以及使用Visual Studio 2008sp1和NUnit 2.5.5以及2.4.8的CodeProject中的示例。我刚刚在C:\上安装了2.4.8,以防带有空格的路径有点奇怪,比如程序文件(x86) 我对使用NUnit的C#样本没有问题 在NUnit GUI中,所有这些C++/CLI项目在尝试打开项目时都会遇到相同的问题 我真

NUnit在C++/CLI中失败,出现System.IO.FileNotFoundException

我尝试了自己新创建的项目,NUnit附带的C++/CLI示例,以及使用Visual Studio 2008sp1和NUnit 2.5.5以及2.4.8的CodeProject中的示例。我刚刚在C:\上安装了2.4.8,以防带有空格的路径有点奇怪,比如
程序文件(x86)

我对使用NUnit的C#样本没有问题

在NUnit GUI中,所有这些C++/CLI项目在尝试打开项目时都会遇到相同的问题

我真的很想使用NUnit,但现在不得不回到标准的Microsoft测试

System.IO.FileNotFoundException...

Server stack trace: 
   at System.Reflection.Assembly._nLoad(AssemblyName fileName, String codeBase, Evidence assemblySecurity, Assembly locationHint, StackCrawlMark& stackMark, Boolean throwOnFileNotFound, Boolean forIntrospection)
   at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
   at System.Reflection.Assembly.InternalLoad(String assemblyString, Evidence assemblySecurity, StackCrawlMark& stackMark, Boolean forIntrospection)
   at System.Reflection.Assembly.Load(String assemblyString)
   at NUnit.Core.Builders.TestAssemblyBuilder.Load(String path)
   at NUnit.Core.Builders.TestAssemblyBuilder.Build(String assemblyName, Boolean autoSuites)
   at NUnit.Core.Builders.TestAssemblyBuilder.Build(String assemblyName, String testName, Boolean autoSuites)
   at NUnit.Core.TestSuiteBuilder.BuildSingleAssembly(TestPackage package)
   at NUnit.Core.TestSuiteBuilder.Build(TestPackage package)
   at NUnit.Core.SimpleTestRunner.Load(TestPackage package)
   at NUnit.Core.ProxyTestRunner.Load(TestPackage package)
   at NUnit.Core.ProxyTestRunner.Load(TestPackage package)
   at NUnit.Core.RemoteTestRunner.Load(TestPackage package)
   at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs)
   at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext)

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.Load(TestPackage package)
   at NUnit.Util.TestDomain.Load(TestPackage package)
   at NUnit.Util.TestLoader.LoadTest(String testName)

我也有同样的问题,但是通过NUnit控制台。原来NUnit控制台是JIT编译到x64而不是x86,我的C++/CLI程序集是x86。它们需要相同才能工作,所以我使用了x86特定版本的控制台。看

希望这有帮助


Matt

是的,我发现人们经常做的一件非常恼人的事情是,即使他们发布单独的x86和x64工具包,他们也会使用Platform=Any编译x86工具包。