Error
I have been getting this error lately: System.ApplicationException: Unable to load ‘NUnitAssemblyName’ because it is not located under the AppBase—->
System.IO.FileNotFoundException: Could not load file or assembly ‘NUnitAssemblyName” or one of its dependencies. The system cannot find
the file specified.
Environment
- Windows 7 32-bit
- NUnit version 2.5.3.9345
- Visual C# Express 2010
- .Net Framework 4
Screenshot from NUnit:
Solution
So I made up my mind to get to the bottom of it. Apparently, to solve the puzzle was staring me right in the face and it is quite simple as:
- In NUnit, click Project -> Configurations and set the applicable build type for your NUnit project.
- Click Project -> Edit… and click ApplicationBase browse button and point the location to your NUnitProject_directorybin<Build_Type>, where Build_Type could be Debug, Release, etc.
- In the future, as soon as you create your NUnit project, be sure to take steps 1 and 2 before adding your NUnit assembly.
That’s it. Hopefully this hint will save someone trouble for the day!
Leave a Reply