Windows 怎么找不到这个程序集?

发布于 2024-10-03 16:42:19 字数 488 浏览 7 评论 0原文

我在 Windows 日志中不断收到此错误:

 SharePointSocialNetworking.Facebook 
   b0ceb144-b183-4b66-aa10-39fd9ee42bd4 
   Could not load file or assembly 'Microsoft.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=736440c9b414ea16' or one of its dependencies. The system cannot find the file specified. 

但它所讨论的程序集已显示在我的 GAC 中:

alt text

我是吗这里缺少一些东西吗? GAC 中的所有内容都与错误消息匹配。 windows怎么找不到这个呢?

I keep getting this error in my windows logs:

 SharePointSocialNetworking.Facebook 
   b0ceb144-b183-4b66-aa10-39fd9ee42bd4 
   Could not load file or assembly 'Microsoft.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=736440c9b414ea16' or one of its dependencies. The system cannot find the file specified. 

But the assembly it's talking about already shows in my GAC:

alt text

Am I missing something here? Everything in the GAC matches the error message. How could windows not find this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

木槿暧夏七纪年 2024-10-10 16:42:19

将 SafeControl 条目添加到您的 web.config:

<configuration>
...
  <SharePoint>
  ...
    <SafeControls>
      ...
      <SafeControl Assembly="Microsoft.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=736440c9b414ea16" Namespace="Microsoft.Contracts" TypeName="*" Safe="True" />
    </SafeControls>
  ...
  </SharePoint>
...
</configuration>

Add a SafeControl entry to your web.config:

<configuration>
...
  <SharePoint>
  ...
    <SafeControls>
      ...
      <SafeControl Assembly="Microsoft.Contracts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=736440c9b414ea16" Namespace="Microsoft.Contracts" TypeName="*" Safe="True" />
    </SafeControls>
  ...
  </SharePoint>
...
</configuration>
琴流音 2024-10-10 16:42:19

它不仅需要找到 Microsoft.Contracts 程序集,还需要找到它的所有依赖项。您需要查看该程序集具有哪些依赖项,并确保它们也都在 GAC 中。

It doesn't just have to find the Microsoft.Contracts assembly but ALL of its dependencies. You need to see what dependencies that assembly has and make sure they all are also in the GAC.

同尘 2024-10-10 16:42:19

你可以在这里找到图书馆
C:\Program Files\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0\mscorlib.dll

You can find the library here
C:\Program Files\Reference Assemblies\Microsoft\Framework.NETFramework\v4.0\mscorlib.dll

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文