Forum Discussion

Eric Skaggs's avatar
Eric Skaggs
Copper Contributor
Jan 03, 2017

The type or namespace name 'S2S' does not exist in the namespace 'Microsoft.IdentityModel'

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?

  • 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.

  • Hi Eric Skaggs,

     

    Can you check the reference to Microsoft.Identity Model?

     

    In my case it is set to:

    C:\WINDOWS\assembly\GAC_MSIL\Microsoft.IdentityModel\3.5.0.0__31bf3856ad364e35\Microsoft.IdentityModel.dll

     

    What version of the Nuget package have you got installed for Microsofty.IdentityModel?

     

    • Eric Skaggs's avatar
      Eric Skaggs
      Copper Contributor

      The problem appears to be related to Microsoft.IdentityModel.Extensions. Maybe Erwin van Hunen or VesaJuvonen can help? :smileyhappy:

       

      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.

       

      1. Download PnP-Sites-Core as a .zip from GitHub: https://github.com/SharePoint/PnP-Sites-Core.
      2. Extract the files somewhere locally.
      3. Open OfficeDevPnP.Core.sln in Visual Studio 2015 Community Edition (running as admin)
      4. Build the solution.
        1. Nuget packages are restored
        2. Build fails
        3. Solution Explorer indicates that it can't find Microsoft.IdentityModel.Extensions

       

      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.

       

      • Erwin van Hunen's avatar
        Erwin van Hunen
        MVP

        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.

Resources