Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8765799
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T16:22:47+00:00 2026-06-13T16:22:47+00:00

I set up a simple project under MonoDevelop, and can run the tests successfully

  • 0

I set up a simple project under MonoDevelop, and can run the tests successfully (*) from there.

When I try nunit-console.exe from the commandline I get this:

 .../mono2/bin/Debug$ nunit-console mono2.exe
 NUnit version 2.5.10.0
 ...
 Runtime Environment - 
   OS Version: Unix 2.6.32.44
  CLR Version: 2.0.50727.1433 ( 2.10.8.1 (Debian 2.10.8.1-1~dhx1~lucid1) )

 ProcessModel: Default    DomainUsage: Single
 Execution Runtime: Default
 Unhandled Exception:
 System.ArgumentException: NUnit components for version 4.0.30319 of the CLR are not installed
 ...

If I’ve elided something important please let me know.

nunit-gui gave the same error. nunit-gui has an option to switch from 2.0 to 4.0, but when I try it gives me that same error again, and so doesn’t let me change it.

More details: Ubuntu 10.04, using the http://badgerports.org/lucid.html repository, so Mono 2.10.8.1.

The project is set to use “Mono/.NET 4.0” according to Project Options in MonoDevelop.

MORE INFO:

/usr/bin/nunit-console contains this:

#!/bin/sh

exec /usr/bin/cli /usr/lib/nunit/nunit-console.exe "$@"

And the /usr/lib/nunit/ directory contains:

   3073 2011-03-14 18:13 nunit.exe.config
   2598 2011-03-14 18:13 nunit-console.exe.config
  23040 2012-02-29 10:19 nunit-console-runner.dll
   4608 2012-02-29 10:19 nunit-console.exe*
  76288 2012-02-29 10:19 nunit.uiexception.dll
 259072 2012-02-29 10:19 nunit.uikit.dll
 183808 2012-02-29 10:19 nunit-gui-runner.dll
   4096 2012-02-29 10:19 nunit.exe*

And nunit-console.exe.config contains:

<?xml version="1.0" encoding="utf-8"?>
<configuration>

  <runtime>
    <!-- We need this so test exceptions don't crash NUnit -->
    <legacyUnhandledExceptionPolicy enabled="1" />

    <!-- Look for addins in the addins directory for now -->
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <probing privatePath="lib;addins"/>
   </assemblyBinding>

   <!--
    The following <assemblyBinding> section allows running nunit under 
    .NET 1.0 by redirecting assemblies. The appliesTo attribute
    causes the section to be ignored except under .NET 1.0
    on a machine with only the .NET version 1.0 runtime installed.
    If application and its tests were built for .NET 1.1 you will
    also need to redirect system assemblies in the test config file,
    which controls loading of the tests.
   -->
   <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"
            appliesTo="v1.0.3705">

      <dependentAssembly> 
        <assemblyIdentity name="System" 
                          publicKeyToken="b77a5c561934e089" 
                          culture="neutral"/>
        <bindingRedirect  oldVersion="1.0.5000.0" 
                          newVersion="1.0.3300.0"/>
      </dependentAssembly>

      <dependentAssembly> 
        <assemblyIdentity name="System.Data" 
                          publicKeyToken="b77a5c561934e089" 
                          culture="neutral"/>
        <bindingRedirect  oldVersion="1.0.5000.0" 
                          newVersion="1.0.3300.0"/>
      </dependentAssembly>

      <dependentAssembly> 
        <assemblyIdentity name="System.Drawing" 
                          publicKeyToken="b03f5f7f11d50a3a" 
                          culture="neutral"/>
        <bindingRedirect  oldVersion="1.0.5000.0" 
                          newVersion="1.0.3300.0"/>
      </dependentAssembly>

      <dependentAssembly> 
        <assemblyIdentity name="System.Windows.Forms" 
                          publicKeyToken="b77a5c561934e089" 
                          culture="neutral"/>
        <bindingRedirect  oldVersion="1.0.5000.0" 
                          newVersion="1.0.3300.0"/>
      </dependentAssembly>

      <dependentAssembly> 
        <assemblyIdentity name="System.Xml" 
                          publicKeyToken="b77a5c561934e089" 
                          culture="neutral"/>
        <bindingRedirect  oldVersion="1.0.5000.0" 
                          newVersion="1.0.3300.0"/>
      </dependentAssembly>

    </assemblyBinding>

  </runtime>

</configuration>

*: Well, I have a problem when I try to use more exotic Nunit attributes; that is the real problem I am trying to troubleshoot which lead me to the one I describe above. However the exe being used above is the one with just two simple tests that do work fine in MonoDevelop.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T16:22:49+00:00Added an answer on June 13, 2026 at 4:22 pm

    The trick is to modify the nunit-console, which (on Ubuntu 10.04, using badgerports, looks like /usr/bin/cli /usr/lib/nunit/nunit-console.exe), to tell /usr/bin/cli to use .NET 4!

    So, when I do this command:

    /usr/bin/cli --runtime=v4.0 /usr/lib/nunit/nunit-console.exe mytest.exe
    

    I get this output:

    NUnit version 2.5.10.0
    ...
    Runtime Environment - 
       OS Version: Unix 2.6.32.44
      CLR Version: 4.0.30319.1 ( 2.10.8.1 (Debian 2.10.8.1-1~dhx1~lucid1) )
    
    ProcessModel: Default    DomainUsage: Single
    Execution Runtime: Default
    ..
    Tests run: 2, Errors: 0, Failures: 0, Inconclusive: 0, Time: 0.040103 seconds
      Not run: 0, Invalid: 0, Ignored: 0, Skipped: 0
    

    If you are only ever going to use NET 4, you could edit /usr/bin/nunit-console to always set this.

    (The real problem is /usr/bin/cli auto-detection is choosing NET 2 instead of NET 4; but after much searching I’ve found no way to control that auto-detection process.)


    ASIDE: The reason I emphasized /usr/bin/cli, is that just telling nunit-console the framework to use fails (see below). I.e. The runtime version has to be given to /usr/bin/cli, not to nunit-console!

    /usr/bin/cli /usr/lib/nunit/nunit-console.exe -framework=v4.0 mytest.exe
    NUnit version 2.5.10.0
    ...
    Runtime Environment - 
       OS Version: Unix 2.6.32.44
      CLR Version: 2.0.50727.1433 ( 2.10.8.1 (Debian 2.10.8.1-1~dhx1~lucid1) )
    
    ProcessModel: Default    DomainUsage: Single
    Execution Runtime: v4.0
    Unhandled Exception:
    System.ArgumentException: NUnit components for version 4.0 of the CLR are not installed
    Parameter name: targetRuntime
      at NUnit.Util.TestAgency.LaunchAgentProcess (NUnit.Core.RuntimeFramework targetRuntime, Boolean enableDebug) [0x00000] in <filename unknown>:0 
    ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I set up ABS with a simple Android project and can't find out why
just set up a simple project to test the functionality of the maven exec
I've set up a really simple project using storyboards including two views as shown
I have set up a few models in a simple django project. When I
I have created a wpf vb.net project and am trying to set a simple
Let's keep things simple shall we? I have a git project set up. Let's
I am trying get my first simple project in rails to run. I have
I have a fairly simple set of functionality for which I have multiple implementations,
What I am trying to do: I have a simple set union function in
Given a simple data set, I would like to be able to calculate a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.