Jan 03 2017 03:28 PM
Jan 03 2017 03:28 PM
I'm new to development against the PnP-Sites-Core solution. After downloading the solution from GitHub, the initial build fails and I'm not sure why. The restoration of all Nuget packages seems to work, but I can't build the solution because "The type or namespace name 'S2S' does not exist in the namespace 'Microsoft.IdentityModel'."
I can't figure out what assembly reference I'm missing or what I'm doing wrong. Any ideas?
Jan 04 2017 02:31 AM
Hi @Eric Skaggs,
Can you check the reference to Microsoft.Identity Model?
In my case it is set to:
What version of the Nuget package have you got installed for Microsofty.IdentityModel?
Jan 04 2017 08:05 AM
I am running the code as-is from GitHub. The reference to Microsoft.IdentityModel in my local copy is C:\Program Files\Reference Assemblies\Microsoft\Windows Identity Foundation\v3.5\Microsoft.IdentityModel.dll. I changed it to match what you have and that did not make any difference.
There is no Nuget package for Microsoft.IdentityModel in the solution, so I did not install one. Here are the steps I'm taking.
Where can I get Microsoft.IdentityModel.Extensions? There is a Nuget package for that, but it's not supported by Microsoft and therefore we can't use it with this solution.
Jan 04 2017 08:27 AM
We are aware of the issue. The file gets installed the moment you install the office developer addons in Visual Studio. So if you have a 'clean' VS installation the file is not there unfortunately. I will discuss this with the team.
Jan 13 2017 08:50 AM
I was able to resolve by installing the Office Developer Tools. Noticed Windows Idenity stuff installed on confirmation screen (see attachment).
Jan 13 2017 10:32 AMSolution
We now removed the dependency to Microsoft.IdentityModel.Extensions and replaced it with our own, which will be distributed with PnP Core. As of the next release the requirement to install the Office Developer Tools will be gone.
Sep 21 2017 05:10 AM
Trying to follow sample code within Office Dev Center.
Having the same issue in that the SharepointContextToken; SharepointContextProvider is not recongized. I have added the Microsoft Identy Model and the mentioned SharepointPNP Identy Model Extensions as explained above to my project.
Does the sample code need to change? Its location is here:
Jul 03 2019 12:52 PM
You need to use NuGet in your solution and add Microsoft.Identity.Model.Extension. You can do this from within visual studio starting with 2017. I just did it with 2019 and now the sample app compiles. Hope you found the solution, since you posted this question 2 years ago.