This page last changed on Jul 02, 2005 by peli.

MbUnit is compiled against .Net 1.0 and will generaly use this framework version. To change this behavior, you need to insert a '''startup''' section in each of the config files :

<?xml version="1.0" encoding="utf-8"?>
 <configuration>
   <configSections>
     <section 
	name="mbunit" 
	type="MbUnit.Core.Config.MbUnitConfigurationSectionHandler, MbUnit.Framework" 
	/>
   </configSections>
   <startup>
    <!--  <supportedRuntime version="2.0.40607" />  uncommend this to use .Net 2.0 beta1-->
      <supportedRuntime version="v1.1.4322"/>
      <supportedRuntime version="v1.0.3705"/>     
   </startup>
   ...
 </configuration>

Important notice

Note that these config files have nothing to do with test assembly config files. See TestConfigurationFiles for the information on setting those.

Test sample

You can use the following fixture to see which framework you are running against. ''Note that the next version of MbUnit will store this information in the report''.

Unable to find source-code formatter for language: cs. Available languages are: actionscript, html, java, javascript, none, sql, xhtml, xml
using System;
using MbUnit.Framework;

namespace Tests
{
   [TestFixture]
   public class RunningFrameworkTest
   {
      [Test]
      public void DisplayFrameworkInfo()
      {
          Console.WriteLine("Framework version: {0}",
              typeof(Object).Assembly.GetName().Version
              );
          Console.WriteLine("mscorlib location: {0}", 
              typeof(Object).Assembly.Location
              );
      }
   }
}

Note: If you are using MbUnit 2.22.0.0 which ships with TestDriven.NET 1.0, the section should reference MbUnit.Core. The code above is for newer builds which merge the .Core and .Framework assemblies. (jschroedl)

<section name="mbunit" type="MbUnit.Core.Config.MbUnitConfigurationSectionHandler, MbUnit.Core" />
Document generated by Confluence on Jun 11, 2007 11:56