Could not load file or assembly 'nunit.framework, Version=2.5.1.9189

1,796 views
Skip to first unread message

Ritesh

unread,
May 27, 2010, 11:32:56 AM5/27/10
to NUnit-Discuss
I recently have found this issue with nunit. I opened the nunit gui
and selected new project and browsed the unit testing dll that I
created and I find this error pasted below. I have never seen this
king of issue. I tried uninstalling and reinstalling nunit with both a
different version and the version mentioned in the errror below.

I also get the same error when I run it from the command line i.e.

"C:\Program Files\NUnit 2.5.1\bin\net-2.0\nunit-console.exe" "C:
\Documents and Settings\rimehta\Local Settings\Temp\TFSrc\RMA Build
Definition\Sources\ClassLibrary1\obj\Debug\ClassLibrary1.dll"

---------------------------
Assembly Not Loaded
---------------------------
System.IO.FileNotFoundException : Could not load file or assembly
'nunit.framework, Version=2.5.1.9189, Culture=neutral,
PublicKeyToken=96d09a1eb7f44a77' or one of its dependencies. The
system cannot find the file specified.

For further information, use the Exception Details menu item.
---------------------------
OK
---------------------------

Charlie Poole

unread,
Jun 1, 2010, 2:06:53 AM6/1/10
to nunit-...@googlegroups.com
You will always get this error if you try to run against the copy of your test assembly in the Visual Studio project obj directory. VS only copies referenced assemblies into the bin directory.

Charlie


--
You received this message because you are subscribed to the Google Groups "NUnit-Discuss" group.
To post to this group, send email to nunit-...@googlegroups.com.
To unsubscribe from this group, send email to nunit-discus...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nunit-discuss?hl=en.


Nidaullah Khan

unread,
Sep 6, 2013, 3:05:03 AM9/6/13
to nunit-...@googlegroups.com, rite...@gmail.com
Hi Charlie,

Then what exactly needs to be done to avoid this FileNotFound Exception. Would be a great help, if u cud provide a brief solution.

thanks,
Nidaullah

Charlie Poole

unread,
Sep 6, 2013, 7:10:20 PM9/6/13
to NUnit-Discuss
As explained in my original answer to this question, you simply should
not be trying to open the assembly from the obj directory, but from
the bin directory.

However, you may not be having the same problem this guy was having
three years ago! Why not take the trouble to explain the problem you
are currently having, especially if you want others to take the
trouble to answer you.

Charlie
> --
> You received this message because you are subscribed to the Google Groups
> "NUnit-Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to nunit-discus...@googlegroups.com.
>
> To post to this group, send email to nunit-...@googlegroups.com.
> Visit this group at http://groups.google.com/group/nunit-discuss.
> For more options, visit https://groups.google.com/groups/opt_out.
Reply all
Reply to author
Forward
0 new messages