2009-10-01 4 views
6

Ho una DLL con test NUnit che ha funzionato correttamente. L'ho convertito da una qualsiasi CPU in un progetto x86 perché ho bisogno di usare SQLite in modo affidabile su piattaforme diverse, quindi ho bisogno di includere System.Data.SQLite.dll a 32 bit e lasciare che tutto faccia riferimento a questo.Ancora un altro "impossibile caricare file o assembly ... o una delle sue dipendenze." Il sistema non riesce a trovare il file specificato "

In ogni caso, dopo la conversione, NUnit emette tale errore quando tenta di caricare la DLL.

Non credo che questo sarà illuminante a tutti, ma qui è l'analisi dello stack:

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) 

La dll che sto cercando di testare i riferimenti un altro nella stessa soluzione. Tutto funziona alla perfezione quando eseguo la GUI che alla fine verrà utilizzata, ma i test non verranno caricati.

Aggiornamento

Il file che non possono essere caricati è l'Assemblea in prova, che è solo MyAppName.Test.dll.

+0

Posso sapere quali sono i file che non possono essere caricati? NUnit.Framework.dll? o qualcos'altro? – Graviton

+0

Vedere l'aggiornamento. (Dannazione, non possiamo usare gli spazi bianchi per raggiungere il limite di caratteri.) –

+0

Il riferimento a NUnit che colpisce il GAC o copia nunit.framework.dll localmente? –

risposta

5

Provare a utilizzare il visualizzatore registro fusione fuslogvw.exe. Dovrebbe darti maggiori dettagli sul problema.