FitSharp is not able to find .DLLs in other folders

1

I'm getting System.IO.FileNotFoundException trying to test my application. My Folder hierarchy is as follow:

  • I have my fitSharp folder with the Runner.exe and the .dll's
  • The system under test is in my debug folder
  • i have a reference to this .dll with: !path ........\Debug\XXXXX.dll

So the problem is, as I'm using Dependecy Injection fitSharp is not able to find the required .dll for unity. I'm getting FileNotFound Exception all the time.

The thing is if i copy all the files (.dll) to my fitSharp folder where the Runner.exe is, the test is working fine.

The problem is, fitsharp is not able to find files in a different folder and i have no idea how to provide this path to fitSharp.

I tried already to use a configuration.xml file to declare all the needed DLLs but still no.

__ EXCEPTION __:System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> XXXException: Verbindung fehlgeschlagen. DatabaseException (0x80004005): Failed to execute non query ---> System.Configuration.ConfigurationErrorsException: An error occurred creating the configuration section handler for unity: Could not load file or assembly 'Microsoft.Practices.Unity.Configuration' or one of its dependencies. Das System kann die angegebene Datei nicht finden. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Practices.Unity.Configuration' or one of its dependencies. Das System kann die angegebene Datei nicht finden. at System.Configuration.TypeUtil.GetTypeWithReflectionPermission(IInternalConfigHost host, String typeString, Boolean throwOnError) at System.Configuration.MgmtConfigurationRecord.CreateSectionFactory(FactoryRecord factoryRecord) at System.Configuration.BaseConfigurationRecord.FindAndEnsureFactoryRecord(String configKey, Boolean& isRootDeclaredHere) at fitSharp.Machine.Model.TypedValue.ThrowExceptionIfNotValid() at fitSharp.Slim.Operators.InvokeInstructionBase.InvokeMember(Tree1 parameters, Int32 memberIndex)
at fitSharp.Slim.Operators.ExecuteCall.ExecuteOperation(Tree1 parameters) at fitSharp.Slim.Operators.InvokeInstructionBase.Invoke(TypedValue instance, MemberName memberName, Tree`1 parameters)
c#
.net
fitnesse
fitnesse-slim
fitsharp
asked on Stack Overflow Apr 12, 2019 by benjamin.klink • edited Apr 16, 2019 by benjamin.klink

1 Answer

1

You can try explicitly loading the missing DLL:

!path pathToDll\Microsoft.Practices.Unity.Configuration.dll

or try this entry in the suite configuration file:

<suiteConfig>
    <System.AppDomainSetup>
        <ApplicationBase>pathToSUT</ApplicationBase>
        ...
answered on Stack Overflow Apr 25, 2019 by Mike Stockdale

User contributions licensed under CC BY-SA 3.0