.NET Framework Bookmark and Share   
 index > .NET Base Class Library > Nunit "System.IO.FileLoadException : Could not load file" Error.
 

Nunit "System.IO.FileLoadException : Could not load file" Error.

HI I am trying to run My unit test cases using Nunit Gui. But i am runnning

Bio.TestAutomation.Algorithms.Alignment.AlignmentBvtTestCases (TestFixtureSetUp):
System.TypeInitializationException : The type initializer for 'Bio.TestAutomation.Algorithms.Alignment.AlignmentBvtTestCases' threw an exception.
----> System.IO.FileLoadException : Could not load file or assembly 'Bio, Version=1.0.0.20816, Culture=neutral, PublicKeyToken=13335e9abfbf69d0' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

Error. Some time it works fine but other times i am running thorugh above error.

I am trying to run Bio.TestAutomation.dll which contains unit test cases and is internally refering Bio.dll.
Both Bio.TestAutomation.dll and Bio.dll will build in same directory.

Can somebody help me to resolve this issue.
Shankar Hullur

you need to check if you are using the correctly signed version of the assembly. i am guessing the Bio.TestAutomation.dll references Bio.dll and both are available in the bin directory and/or in GAC.

Please have a look at how CLR loads the assembly.http://msdn.microsoft.com/en-us/library/yx7xezcf.aspx
please refer to Understanding The CLR Binder for your reference: http://msdn.microsoft.com/en-us/magazine/dd727509.aspx


kashif
Kpbutt
HI kashif,

Thanks for your reply..

Yes .. you are rite.. both BioTestAutomation dll references Bio.dll and both are in bin directory and are not in GAC, BioTestautomation.dll is not signed version of the assembly.


Thanks,
Shankar.
Shankar Hullur

You can use google to search for other answers

Custom Search

More Threads

• Process is created through Process Class but nothing is appearing....
• Use TimeSpan to create a duration (count up)?
• Dependency on Windows Installer 3.0 limits targets for .NET 2.0
• Does RSACryptoServiceProvider and DSACryptoServiceProvider transmit the original unencrypted message?
• Reading the attribute values !!!
• serializing just the base class
• Windows Froms Controls initialization on Class Contructor
• Paring a string with spaces without using space as separator.
• Active Directory: Enumerate all groups that a user belogs to, including nested groups.
• Reading AppSettings Sections