How is windows not finding this assembly?
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:
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
精彩评论