开发者

How is windows not finding this assembly?

开发者 https://www.devze.com 2023-01-26 19:45 出处:网络
I keep gett开发者_开发技巧ing this error in my windows logs: SharePointSocialNetworking.Facebook

I keep gett开发者_开发技巧ing 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:

How is windows not finding this assembly?

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


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>


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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消