.NET 中完全限定的类型解析
简单的问题(在 SharePoint 2010 中出现,但这并不真正相关)。
如何:
<add name="LdapMembershipProvider" type="Microsoft.Office.Server.Security.LdapMembershipProvider, Microsoft.Office.Server, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"
...仅在 Microsoft.Office.Server.UserProfiles 程序集中找到实际类型 (LdapMembershipProvider),而不是在 Microsoft. Office.Server 组件?
两者均已在 GAC 注册。
即使指定了完全限定类型,Fusion 也会探测其他程序集吗?
Simple question (comes up in SharePoint 2010, but that's not really relevant).
How does:
<add name="LdapMembershipProvider" type="Microsoft.Office.Server.Security.LdapMembershipProvider, Microsoft.Office.Server, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"
...resolve when the actual type (LdapMembershipProvider) is only found in the Microsoft.Office.Server.UserProfiles assembly and not in the Microsoft.Office.Server assembly?
Both are GAC registered.
Does Fusion probe other assemblies, even when a fully qualified type is specified?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
程序集绑定重定向?
MSDN - 程序集绑定重定向?
Assembly binding redirection?
MSDN - Assembly Binding Redirection ?
公钥令牌是否有可能实际上指向正确的程序集并且忽略程序集名称?
我正在阅读以下 MSDN 参考:
http://msdn。 microsoft.com/en-us/library/system.reflection. assemblyname.aspx
听起来可疑的摘录:
不确定。立即浮现在脑海中但我无法确认的一种行为是,如果它无法在配置中指定的程序集中找到类型,它会尝试通过项目引用找到它。
Is it possible that the public key token is actually pointing to the correct assembly and its ignoring the assembly name?
I was reading the following MSDN reference:
http://msdn.microsoft.com/en-us/library/system.reflection.assemblyname.aspx
The excerpt that sounds suspicious:
Not sure. One behaviour that immediately springs to mind, but I cannot confirm is that if it fails to find the type in the assembly you specify in configuration, it tries to find it through your project references.