Re: filenotfoundexception nunit.framework@InstallAdhocExtensions
"JahMic" <[email protected]> Fri, 11 Jul 2008 23:24:26 +0900
| Newsgroups | gmane.comp.windows.dotnet.nunit.user |
|---|---|
| Message-ID | <003801c8e361$d40db4a0$3f09fea9@ZenWan1> |
In this case, it was due to not having the nunit assembly in the same directory, as I was copying my built files into a common directory sans the nunit. All happy now... Well, except the failed tests... Thanks, J ----- Original Message ----- From: "Charlie Poole" <[email protected]> To: <[email protected]> Sent: Friday, July 11, 2008 2:17 AM Subject: Re: [Nunit-users] filenotfoundexception nunit.framework@InstallAdhocExtensions > NUnit can run tests built against an older framework version as far > back as 2.0. However, this will only work so long as the old framework > is available where your tests can load it. > > So first, make sure that whatever framework you compile your tests > against is actually available to them, usually by being in the > same directory as the test assembly. Note that this is different > from NUnit 2.2, which put the framework assembly in the GAC. > > Sometimes "File not found" masks another error, so make sure you > are referencing a version of the framework that is built for .NET > 2.0. If that's OK, then please post info about where the various > assemblies are located with respect to one another. > > Charlie > > >> -----Original Message----- >> From: [email protected] >> [mailto:[email protected]] On Behalf Of JahMic >> Sent: Thursday, July 10, 2008 7:03 AM >> To: [email protected] >> Subject: [Nunit-users] filenotfoundexception nunit.framework >> @InstallAdhocExtensions >> >> Hello, >> >> I have recentely upgraded to 2.4.7 from 2.2.something the >> other day (and today installed .NET 3.5.., I'm not sure how >> relevant) I'm referencing nunit.framework from the installed >> location (program files\...). >> >> I loaded up one of my old *.nunit files. It showed the >> assembles and the tests, with various not friendly symbols. >> A simple run failed to run any of the tests. I then noticed >> that my assemblies might not be up to date. so recompiled >> and reloaded the nunit project. Ever since then, I keep >> getting the below exception upon load. >> >> Any suggestions on how to resolve this? >> >> Thanks, J >> >> System.IO.FileNotFoundException : Could not load file or >> assembly 'nunit.framework, Version=2.4.7.0, Culture=neutral, >> PublicKeyToken=96d09a1eb7f44a77' or one of its dependencies. >> The system cannot find the file specified. >> System.IO.FileNotFoundException... >> >> Server stack trace: >> at System.ModuleHandle.ResolveType(Int32 typeToken, >> RuntimeTypeHandle* typeInstArgs, Int32 typeInstCount, >> RuntimeTypeHandle* methodInstArgs, Int32 >> methodInstCount) >> at System.ModuleHandle.ResolveTypeHandle(Int32 typeToken, >> RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] >> methodInstantiationContext) >> at System.Reflection.Module.ResolveType(Int32 >> metadataToken, Type[] genericTypeArguments, Type[] >> genericMethodArguments) >> at >> System.Reflection.CustomAttribute.FilterCustomAttributeRecord( >> CustomAttributeRecord >> caRecord, MetadataImport scope, Assembly& >> lastAptcaOkAssembly, Module decoratedModule, MetadataToken >> decoratedToken, RuntimeType attributeFilterType, Boolean >> mustBeInheritable, Object[] attributes, IList >> derivedAttributes, RuntimeType& attributeType, >> RuntimeMethodHandle& ctor, Boolean& ctorHasParameters, >> Boolean& isVarArg) >> at System.Reflection.CustomAttribute.GetCustomAttributes(Module >> decoratedModule, Int32 decoratedMetadataToken, Int32 >> pcaCount, RuntimeType attributeFilterType, Boolean >> mustBeInheritable, IList derivedAttributes) >> at >> System.Reflection.CustomAttribute.GetCustomAttributes(RuntimeType >> type, RuntimeType caType, Boolean inherit) >> at System.RuntimeType.GetCustomAttributes(Type >> attributeType, Boolean >> inherit) >> at >> NUnit.Core.CoreExtensions.InstallAdhocExtensions(Assembly assembly) >> 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.RemoteTestRunner.Load(TestPackage package) >> at >> System.Runtime.Remoting.Messaging.StackBuilderSink._PrivatePro >> cessMessage(IntPtr >> md, Object[] args, Object server, Int32 methodPtr, Boolean >> fExecuteInContext, Object[]& outArgs) >> at >> System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProc >> essMessage(RuntimeMethodHandle >> md, Object[] args, Object server, Int32 methodPtr, Boolean >> fExecuteInContext, Object[]& outArgs) >> at >> System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcess >> Message(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) >> >> >> >> -------------------------------------------------------------- >> ----------- >> Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! >> Studies have shown that voting for your favorite open source >> project, along with a healthy diet, reduces your potential >> for chronic lameness and boredom. Vote Now at >> http://www.sourceforge.net/community/cca08 >> _______________________________________________ >> Nunit-users mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/nunit-users >> > > > > ------------------------------------------------------------------------- > Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! > Studies have shown that voting for your favorite open source project, > along with a healthy diet, reduces your potential for chronic lameness > and boredom. Vote Now at http://www.sourceforge.net/community/cca08 > _______________________________________________ > Nunit-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/nunit-users ------------------------------------------------------------------------- Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08