支持程序集是否需要在 GAC 中注册?
最近,我必须在 GAC 中为我编写的自定义共享点作业注册一个程序集。安装后,它开始抛出错误,指出无法加载程序集“或其依赖项之一”。我是否需要在 GAC 中注册任何支持程序集(例如 System.Collections)才能让我的主程序集被识别?
I recently had to register an assembly in my GAC for a custom sharepoint job I wrote. Once installed it began throwing an error saying that it could not load an assembly "or one of its dependencies". Do I need to register any of the supporting assemblies (System.Collections for instance) in the GAC in order to get my main assembly recognized?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是的,您应该在 GAC 中注册所有尚未存在的引用程序集。
备注:
System.Collections
是一个命名空间,而不是一个程序集,它是 BCL 的一部分,并且已存在于 GAC 中。Yes, you should register all referenced assemblies in the GAC which are not already present there.
Remark:
System.Collections
is a namespace and not an assembly which is part of the BCL and already present in the GAC.组成 .NET Framework 的所有程序集都应该已位于 GAC 中。因此包含 System.Collections 的程序集不需要注册。
但是,您的代码所依赖的任何自定义构建的程序集都应放入 GAC 中。
All of the assemblies that comprise the .NET Framework should already be in the GAC. So the assembly that contains System.Collections should not need to be registered.
However, any custom built assemblies that your code depends on should be put in the GAC.