组装探测-如何指示在bin文件夹下而不是GAC下查找? [英] Assembly probing - how to instruct to look under bin folder instead of GAC?

查看:69
本文介绍了组装探测-如何指示在bin文件夹下而不是GAC下查找?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

组装探测-如何指示运行时在bin文件夹而不是GAC下查看?

根据
但这不是我所需要的,我真的需要它进入bin文件夹吗?

这可能是相关的. [^ ]

还要如何检查要绑定到哪个版本?我启动了"fuslogvw",但它只是坐在那里.由于某种原因没有任何显示……这让我头疼,因为(a)GAC中的dll没有调试信息(即使在DEBUG构建下)
(b)nHibernate映射文件正在加载-我的映射文件位于bin文件夹中,不在GAC中

感谢

Hello,

Assembly probing - how to instruct runtime to look under bin folder instead of GAC?

According to this article[^], runtime default behavior is to check GAC BEFORE other location.

So the fact that I added probing hint didn''t change this (i.e. runtime is still binding to dll in GAC):
<br /><assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><br /> <probing privatePath="bin;bin\Debug;bin\Release;"/><br /> </assemblyBinding><br />
But this is NOT what I need, I actually need it to go bin folder for it?

This may be relevant.[^]

Also how can I check which version is being binded to? I launched "fuslogvw" but it is just sitting there. Nothing shows for some reason... it''s giving me headache because (a) dll in GAC no debug information (even under DEBUG build)
(b) nHibernate mapping files loading - my mapping files are in bin folder, not in GAC

Thanks

推荐答案

AppDomain.CurrentDomain.AssemblyLoad



> AppDomain.CurrentDomain.AssemblyResolve

您可以通过这些事件编写一些代码来实现您的目标.

AppDomain.CurrentDomain.AssemblyLoad

and

AppDomain.CurrentDomain.AssemblyResolve

You may be able to write some code with those events to accomplish your goals.


这篇关于组装探测-如何指示在bin文件夹下而不是GAC下查找?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆