C# FitSharp无法在其他文件夹中找到.dll

C# FitSharp无法在其他文件夹中找到.dll,c#,.net,fitnesse,fitnesse-slim,fitsharp,C#,.net,Fitnesse,Fitnesse Slim,Fitsharp,我在尝试测试我的应用程序时遇到System.IO.FileNotFoundException。我的文件夹层次结构如下所示: 我有我的fitSharp文件夹,其中包含Runner.exe和.dll 正在测试的系统位于我的调试文件夹中 我对这个.dll有一个引用:!路径……。\Debug\XXXXX.dll 所以问题是,当我使用依赖注入时,fitSharp无法找到unity所需的.dll。我总是遇到FileNotFound异常 问题是,如果我将所有文件(.dll)复制到Runner.exe所在的

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

  • 我有我的fitSharp文件夹,其中包含Runner.exe和.dll
  • 正在测试的系统位于我的调试文件夹中
  • 我对这个.dll有一个引用:!路径……。\Debug\XXXXX.dll
所以问题是,当我使用依赖注入时,fitSharp无法找到unity所需的.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>
        ...

pathToSUT
...

请发布异常的全文。请参阅上面的完整异常。非常感谢。删除参考并安装fitSharp NuGet软件包,然后一切正常。谢谢,我安装了NuGet软件包。在构建我的项目之后,只有DLL被复制到我的调试文件夹=>中,因此我遇到了与以前相同的问题。有没有办法在我的调试文件夹中获取runner.exe,还是没有意义?还是我做错了什么?