0

I have been trying to migrate over to FitSharp after we upgraded our project to .NET 4.0 however I am currently stuck with the error:

System.TypeLoadException: Could not load type 'fit.PrimitiveFixture' from assembly 'fit, Version=2.2.4498.25494, Culture=neutral, PublicKeyToken=null'.
  at System.Reflection.RuntimeAssembly.GetExportedTypes(RuntimeAssembly assembly, ObjectHandleOnStack retTypes)
  at System.Reflection.RuntimeAssembly.GetExportedTypes()
  at fitSharp.Machine.Engine.CurrentDomain.LoadAssembly(String assemblyPath)
  at fitSharp.Machine.Engine.ApplicationUnderTest.Assemblies.AddAssembly(String assemblyName)
  at fitSharp.Machine.Engine.ApplicationUnderTest.AddAssemblies(IEnumerable`1 assemblyNames)
  at fitnesse.fitserver.FitServer.ParseCommandLineArguments(IEnumerable`1 args)
  at fitnesse.fitserver.FitServer.Run(IList`1 CommandLineArguments)
  at fitnesse.fitserver.FitServer.Run(IList`1 commandLineArguments, Memory memory, ProgressReporter reporter)
  at fitSharp.Machine.Application.Shell.Run()
  at fitSharp.Machine.Application.Shell.Execute()
  at fitSharp.Machine.Application.Shell.Run(IList`1 commandLineArguments)

I am using fitnesse-standalone.jar as server if that makes any difference and have ofc. defined the FitSharp runner in the root of fitnesse, we have placed fitsharp in a subdirectory inside fitnesse, so the path is relative.

!path ..\..\..\Output\Runtime\*.dll
!define COMMAND_PATTERN {%m -r fitnesse.fitserver.FitServer,fitSharp\fit.dll %p}
!define TEST_RUNNER {fitsharp\Runner.exe}

Obviously fit.PrimitiveFixture doesn't exist, in general I can see that fit.dll has shrinked quite a bit compared to the one bundled with FitNesse it self.

I haven't been able to determine why it tries to load it though, where that stems from... I have looked if there where any breaking changes that could hint anything, but that didn't really give me an idea, obviously I have also changed all references to fit so that it points to the new library rather than the bundled and compiled with success (had to add fitsharp.dll as well though)...

I can't really get into debugging as it fails long before that...

One should have thought others had experienced the same thing, that doesn't quite seem to be the case though, at least my google attempts hasn't yielded much use-able results.

So here is to hoping that someone has run into the same problem, yet solved it them self wihtout sharing the information online. Someone who might have deeper knowledge of FitNesse and FitSharp?

Jens
  • 3,353
  • 1
  • 23
  • 27

1 Answers1

0

Could be a problem with one of the assemblies in your path: ......\Output\Runtime*.dll Try listing just the individual assemblies that are needed for your tests and see if this helps narrow down the one that's causing the issue.

Mike Stockdale
  • 5,256
  • 3
  • 29
  • 33
  • Well that will be hard to do since we already only outputs what we need to that folder, and that would just shift the error to those missing assemblies. Even if we had other assemblies we didn't need for the FitNesse tests, they wouldn't depend on anything from FitNesse, and so they wouln't be able to generate that error. – Jens Jan 15 '13 at 12:17