我正在使用一个wpf应用程序。我使用BootLoader方法预先加载所有dll。当我把断点放入我的一个DLL时。我无法调试,我的断点没有命中,断点也没有被禁用。如何在使用visual studio 2015预加载时调试dll
所有选项都是正确的。即使模块选项卡显示加载符号和组装的PDB文件是在同一位置
private readonly ConcurrentDictionary<string, Assembly> _libs;
public App()
{
_libs = new ConcurrentDictionary<string, Assembly>();
BootLoader();
}
private void BootLoader()
{
Assembly a;
foreach (var dll in new DirectoryInfo(System.AppDomain.CurrentDomain.BaseDirectory + @"\..\..\").GetFiles("*.dll", SearchOption.AllDirectories))
{
if (!_libs.TryGetValue(dll.Name, out a))
{
if (!_libs.TryAdd(dll.Name, Assembly.LoadFile(dll.FullName)))
{
Logger.Error($"CurrentDomain_AssemblyResolve: could not add {dll.Name} in assembly list");
}
}
}
请协助。
您能否澄清一下“我无法调试”? –
@AlexeiLevenkov:更新了问题。我的断点没有命中,它们也启用 – vishal
你在哪里实际调用dll内的代码。加载不执行它。 – codenheim