I'm getting System.IO.FileNotFoundException trying to test my application. My Folder hierarchy is as follow:
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)
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>
...