问题描述
我有NUnit的测试,一直工作正常的DLL。我将它转换从任何CPU为x86的项目,因为我需要使用SQLite可靠地在不同的平台,所以我需要包括32位System.Data.SQLite.dll,让一切引用。
I have a dll with NUnit tests that had been working fine. I converted it from an Any CPU to an x86 project because I need to use SQLite reliably across different platforms, so I need to include the 32-bit System.Data.SQLite.dll and let everything reference that.
总之,转换后,NUnit的给试图加载DLL时的错误。
Anyway, after conversion, NUnit gives that error when trying to load the dll.
我不认为这将是启发可言,但这里是堆栈跟踪:
I don't think this will be enlightening at all, but here is the stack trace:
System.IO.FileNotFoundException: Could not load file or assembly ... or one of its dependencies. The system cannot find the file specified"
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)
我想测试引用另一位在同一个解决方案的DLL。一切正常,当我运行,这最终全部被使用的图形用户界面,但测试将不会加载。
The dll I'm trying to test references another one in the same solution. Everything works fine when I run the GUI that this eventually all gets used in, but the tests won't load.
更新
这是无法加载的文件是被测组件,它只是MyAppName.Test.dll。
The file that can't be loaded is the assembly under test, which is just MyAppName.Test.dll.
推荐答案
尝试使用融合日志查看器的。它应该给你关于这个问题的更多细节。
Try using the fusion log viewer fuslogvw.exe. It should give you more details about the problem.
这篇关于另一个与QUOT;无法加载文件或程序集...或者它的一个依赖。该系统找不到指定&QUOT文件;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!