Reputation: 129
I am trying to use IdentityModel.dll via a custom class library.
I have a Web Service (which will be deployed in SharePoint as WSP) where I want to use IdentityModel.Oidcclient DLL. This DLL is unsigned (does not have strong name). The signed version of DLL is asking for higher version of .Net framework. We cannot upgrade.
To solve this issue: I referred the IdentityModel.dll in my custom class library MyLibrary.dll and referred custom class library MyLibrary.dll in my original project 'MyWebService'.
Per plan, the unsigned issue of Identitymodel.OidcClient is resolved. But we are getting error for IdentityModel.dll.
Now I am getting error
{"Could not load file or assembly 'IdentityModel, Version=3.10.6.0, Culture=neutral, PublicKeyToken=e7877f4675df049f' or one of its dependencies. The system cannot find the file specified.":"IdentityModel, Version=3.10.6.0, Culture=neutral, PublicKeyToken=e7877f4675df049f"}
.
I added the same version in project. Even public key token is same. I deployed the DLL in GAC using GACUTIL. But not resolved. I am stuck here.
Upvotes: 2
Views: 666
Reputation: 1259
Add the following key to the section in your web.config:
<compilation debug="true" targetFramework="4.5" >
<assemblies>
<add assembly="IdentityModel, Version=3.10.6.0,
Culture=neutral, PublicKeyToken=e7877f4675df049f" />
</assemblies>
</compilation>
Upvotes: 1