NUnit: ... not located under the AppBase.

Posted on 2005-05-11
Last Modified: 2010-05-19
Using NUnit 2.2 I get this error message:
System.ApplicationException: Unable to load <MyFile> because it is not located under the AppBase.

However, I can open an assembly (File | Open) and run the test but if I save the project, quit NUnit, reopen it (either by the icon in my start menu or by a double click on the *.nunit file) I can't get it to work anymore. Anyone got a clue?


(I use .NET 2.0 Beta, if that's important)
Question by:__alex
    LVL 96

    Expert Comment

    by:Bob Learned
    AFAIK I don't think that NUnit 2.2 will work with the Beta.

    LVL 2

    Author Comment

    AFAIK it does :-) :
    If multiple versions of the .NET framework are installed, the configuration files nunit-gui.exe.config and nunit-console.exe.config control which one of them is selected when running the gui and console runner respectively. As originally installed, that order is .NET 1.1, .NET 2.0 and .NET 1.0. To change which version is used, simply change the order of the elements in the config files. The nunit-gui About Box shows the framework version currently being used.

    LVL 96

    Accepted Solution

    I am not keeping up with times :(  I have 2.2.0, and I remember reading something about people have so many problems with the beta.  There is a 2.2.2 version available.  Is that the version that you have?

    I found this entry.  Did you see it also?  Are you using Beta 1?

    If you plan to use it with Visual Studio 2005 beta 1, <supportedRuntime version="v2.0.40607" /> in the <startup> section of the config files (nunit-gui.exe.config and nunit-console.exe.config) must appear in first position.

    LVL 2

    Author Comment

    The same problem appears with .NET Version 1.1.4322

    File | Open "C:\Program Files\NUnit2.2\bin\mock-assembly.dll"
    Run button
    ---> Everything is fine
    Save as "Desktop\mock-assembly.dll.nunit"
    ---> Error
    LVL 2

    Author Comment

    Ok, got it:
    *.nunit file and assembly are supposed to be in the same directory.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
    Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    Here's a very brief overview of the methods PRTG Network Monitor ( offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now