title: Invoking mbunit Test Runner Programmatically
body: <p>I am currently building a test suite using mbunit. So far so good, but instead of using the included Icarus GUI, I want to have my own test runner. Not knowing much about what to do, I go on Gallio's Google group and copied the code posted by a user:</p>
  
  <p><a href="http://groups.google.com/group/gallio-user/browse_thread/thread/afab404a14674cd2" rel="noreferrer">http://groups.google.com/group/gallio-user/browse_thread/thread/afab404a14674cd2</a></p>
  
  <p>And I got the following exception instead:</p>
  
  <p>Gallio.Runtime.RuntimeException was unhandled
    Message=Could not resolve component for service type 'Gallio.Runner.Projects.ITestProjectManager' because there do not appear to be any components registered and enabled for that service type.
    Source=Gallio
    StackTrace:
         at Gallio.Runtime.Extensibility.RegistryServiceLocator.ResolveNonDisabledDescriptor(Type serviceType)
         at Gallio.Runtime.Extensibility.RegistryServiceLocator.ResolveImpl(Type serviceType)
         at Gallio.Runtime.Extensibility.RegistryServiceLocator.ResolveTService
         at Gallio.Runner.TestLauncher.RunWithRuntime()
         at Gallio.Runner.TestLauncher.Run()
         at Dundas.Dashboard.TestSystem.TestPrograms.Driver.RunTests() in C:\Users\edmondc\Documents\Visual Studio 2010\Projects\AutomatedTestSystem\TestPrograms\ImageComparisonTest\Driver.cs:line 49
         at Dundas.Dashboard.TestSystem.Program.Main(String[] args) in C:\Users\edmondc\Documents\Visual Studio 2010\Projects\AutomatedTestSystem\TestConsole\Program.cs:line 13
         at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
         at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
         at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
         at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
         at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
         at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
         at System.Threading.ThreadHelper.ThreadStart()
    InnerException: </p>
  
  <p>What am I doing wrong there?</p>