.net 无法将应用程序配置为加载外部dll';从另一个文件夹中删除

.net 无法将应用程序配置为加载外部dll';从另一个文件夹中删除,.net,visual-studio-2010,dll,deployment,installation,.net,Visual Studio 2010,Dll,Deployment,Installation,我正在尝试将我的external.dll(如DevExpress和其他)移动到另一个名为“lib”的文件夹中 我在app.config文件中添加了以下行: <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <probing privatePath="lib" /> </assemblyBinding> 如果我将application.exe.config文

我正在尝试将我的external.dll(如DevExpress和其他)移动到另一个名为“lib”的文件夹中

我在app.config文件中添加了以下行:

<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
  <probing privatePath="lib" />
</assemblyBinding>
如果我将application.exe.config文件更改为从基本目录加载,并将.dll复制回基本目录,则运行正常

// RUNS FINE
..\MyApp\Application.exe
..\MyApp\Application.exe.config // With assemblyBinding removed
..\MyApp\*.dll // All dll files are here
有什么问题吗


谢谢。

这是由于配置文件中的错误造成的。修复错误后,它开始工作。

首先使用调试器。如果您的代码正在吞咽异常,则使用“调试+异常,抛出”复选框在抛出异常时强制停止。Fuslogvw.exe是解决程序集解析问题的好工具。我无法重现该问题。你描述的两个场景对我都有效。需要更多关于发生了什么错误的信息。谢谢,在调试之后,我在app.config文件中看到这是一个错误。现在工作!
// RUNS FINE
..\MyApp\Application.exe
..\MyApp\Application.exe.config // With assemblyBinding removed
..\MyApp\*.dll // All dll files are here