3

I want to run MbUnit tests with Icarus and/or Echo without having to install Gallio. I have copied all of the files in the GallioBundle/bin into a folder named Third Party/MbUnit in our project folder.

When I double click on Gallio.Icarus.exe it doesn't load or do anything.

When I run gallio.echo.exe from the command line I get the following error:

Start time: 1:07 PM Initializing the runtime and loading plugins. Stop time: 1:07 PM (Total execution time: 0.313 seconds) Error: A fatal exception occurred. Gallio.Runtime.RuntimeException: 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. at Gallio.Runtime.Extensibility.RegistryServiceLocator.ResolveNonDisabledDescriptor(Type serviceType) in c:\RelEng\Projects\MbUnit v3.1\Work\src\Gallio\Gallio\Runtime\Extensibility\RegistryServiceLocator.cs:line 202 at Gallio.Runtime.Extensibility.RegistryServiceLocator.ResolveImpl(Type serviceType) in c:\RelEng\Projects\MbUnit v3.1\Work\src\Gallio\Gallio\Runtime\Extensibility\RegistryServiceLocator.cs:line 161 at Gallio.Runtime.Extensibility.RegistryServiceLocator.ResolveTService in c:\RelEng\Projects\MbUnit v3.1\Work\src\Gallio\Gallio\Runtime\Extensibility\RegistryServiceLocator.cs:line 52 at Gallio.Runner.TestLauncher.RunWithRuntime() in c:\RelEng\Projects\MbUnit v3.1\Work\src\Gallio\Gallio\Runner\TestLauncher.cs:line 511 at Gallio.Runner.TestLauncher.Run() in c:\RelEng\Projects\MbUnit v3.1\Work\src\Gallio\Gallio\Runner\TestLauncher.cs:line 474 at Gallio.Echo.EchoProgram.RunTests(ILogger logger) at Gallio.Echo.EchoProgram.RunImpl(String[] args) at Gallio.Runtime.ConsoleSupport.ConsoleProgram`1.Run(IRichConsole console, String[] args) in c:\RelEng\Projects\MbUnit v3.1\Work\src\Gallio\Gallio\Runtime\ConsoleSupport\ConsoleProgram.cs:line 198

However, if I run it from where I have unzipped in my d/l folder to:

GallioBundle-3.1.397.0/bin Icarus UI comes up. Also... gallio.echo gives no errors when I run it at the command line. This makes no sense to me but there it is.

Why won't Gallio run from my project's folder?

Keith Pinson
  • 7,835
  • 7
  • 61
  • 104
PilotBob
  • 3,107
  • 7
  • 35
  • 52

3 Answers3

3

The name of the folder doesn't matter.

On first run Gallio scans for plugins in the folder and writes them to an XML file in %LocalAppData%\Gallio\Plugin Metadata Cache. If you run an executable in a broken installation of Gallio (e.g. some files may be missing) Gallio caches this, and even if you later fix the files, it still believes that the installation is broken, because it sees the cached view of its metadata. When you move Gallio into a different folder it recreates the cache for that folder and things start to work again (provided the files are actually all there).

The fix then is to simply wipe the Plugin Metadata Cache folder.

Stefan Dragnev
  • 14,143
  • 6
  • 48
  • 52
  • you SAY that, but I verified it. Do you think I was seeing things? – PilotBob Oct 23 '14 at 16:10
  • I mean that it doesn't matter directly, as in it's not hard-coded somewhere to look for a `bin/` folder. It's just that after a wonky start-up the cache gets thrashed and you can't run Gallio in that folder until you kill the cache, – Stefan Dragnev Oct 24 '14 at 07:16
  • Well, problem solved for ever ago. Although, I think it's time to migrate away from Gallio and mbunit. They seem to be not kept up any more. – PilotBob Oct 24 '14 at 13:33
3

It should work fine. Gallio really doesn't care about what the folder is called. The error above usually appears when some files are missing.

Another thing to try may be to run "Gallio.Utility.exe ResetInstallationId"

Jeff Brown
  • 1,178
  • 5
  • 8
  • 1
    I agree, it should work, but it doesn't. I don't get it either. BTW: I did not run the installer. I am just using the binary bundle. – PilotBob Jun 24 '10 at 14:26
  • 1
    I had the same problem when using the binary bundle. If I unzip it to a directory structure of "Lib\Gallio", Gallio.Echo.exe throws the above error. If I put it in a directory of "GallioBundle-3.3.458.0\bin", it works fine. And then it runs fine anywhere I put it after that? Super weird. – Dan Fitch Feb 23 '12 at 18:08
1

It seems that having the binary files in a folder named MbUnit was causing the problem. When I renamed the folder to Gallio everything started working correctly.

The Gallio devs have told me they can't duplicate this... but it was consistent and I even renamed the folder back and the error recurred.

PilotBob
  • 3,107
  • 7
  • 35
  • 52