FitSharp 无法在其他文件夹中找到 .DLL

FitSharp is not able to find .DLLs in other folders

我正在 System.IO.FileNotFoundException 尝试测试我的应用程序。我的文件夹层次结构如下:

所以问题是,当我使用依赖注入时,fitSharp 无法找到统一所需的 .dll。我一直收到 FileNotFound 异常。

问题是,如果我将所有文件 (.dll) 复制到 Runner.exe 所在的 fitSharp 文件夹,测试工作正常。

问题是,fitsharp 无法在不同的文件夹中找到文件,我不知道如何提供 fitsharp 的路径。

我已经尝试使用 configuration.xml 文件来声明所有需要的 DLL,但仍然没有。

__ 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)

您可以尝试显式加载丢失的 DLL:

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

或在套件配置文件中尝试此条目:

<suiteConfig>
    <System.AppDomainSetup>
        <ApplicationBase>pathToSUT</ApplicationBase>
        ...