amayer171292591
amayer171292591

Reputation: 240

The type or namespace name 'ClaimsAuthenticationManager' could not be found

I am trying to use the ClaimsAuthenticationManager class but I cannot figure out how to add the proper namespace to my project.

When I try to use the class in my project I get the error, "The type or namespace name 'ClaimsAuthenticationManager' could not be found. Typically this is resolved by installing the correct nuget package and using the namespace. However this seems to be a special case.

This SO question A member of the System.Security.Claims namespace is not available? is very similar. The resolution was to add a reference to System.IdentityModel.dll.

I added a reference to System.IdentityModel.dll by right clicking on the project and selecting Add>Reference. I pointed it to System.IdentityModel.dll on disk at the location: C:\Program Files\Reference Assemblies\Microsoft\Windows Identity Foundation\v3.5\System.IdentityModel.dll.

I've also added the using statement: "using System.Security.Claims;"

I tried cleaning and rebuilding the project. Still having the same issue.

Upvotes: 2

Views: 1082

Answers (1)

Peter van der Post
Peter van der Post

Reputation: 46

I had a similar problem. Classes are spread over different namespaces and assemblies. Use the regular 'Add References' to find the .NET Framework 4.5 version of System.IdentityModel. The Version will be 4.0.0.0. My File Version is "4.0.30319.18020 built by FX45RTMGDR".

See this article for mapping between WIF 3.5 and 4.5: http://msdn.microsoft.com/en-us/library/jj157091.aspx

regards, Peter

Upvotes: 3

Related Questions