2
以下是我的目錄結構ASP.NET集探測問題
E:\測試\探測
目錄探測containts可執行[Probing.exe]其中加載DLL文件(Probe.dll) 。
的代碼是:
namespace Probing
{
class Program
{
static void Main(string[] args)
{
Assembly asm = Assembly.Load("Probe.dll");
if (asm != null)
{
Console.WriteLine("Assembly Probe is loaded");
}
else
{
Console.WriteLine("Assembly Probe is not loaded");
}
}
}
}
DLL文件是(Probe.dl)駐留在子目錄(例如:\測試\探測\ CustomLibraries \ Probe.dll)。
我提供了Probing.exe.config文件,甚至App.config來定位程序集。
配置文件包含以下代碼:
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="CustomLibraries"/>
</assemblyBinding>
</runtime>
</configuration>
我收到FileNotFound異常,直到我把DLL的bin目錄內。
我需要你們的幫助(我使用Visual Studio 2008)