Where can I find Microsoft.IdentityModel.Extensions.dll library?

In addition to Štefan Bartoš answer, my problem was fixed only after installing WIF using Visual Studio Installer. You can find it in Installation Details for SharePoint.

enter image description here


Right click your project and opt for Manage NuGet Package and look for the following extension Windows Identity Foundation

Alternately, you can download it from here. Afterwards reinstalling the NuGet packages may be necessary: Update-Package –reinstall


Search and install Windows Identity Foundation. One possibility is to use Nuget

PM> Install-Package Microsoft.IdentityModel

To include Microsoft.IdentityModel.Extensions for WIF runtime support, perform the following steps:

  1. Download and install the WIF runtime and SDK for .NET Framework 4.0.
    Note that the Microsoft.IdentityModel assembly is located
    under the %Program Files%\Reference Assemblies\
    Microsoft\Windows Identity Foundation\v3.5 folder.
    
  2. Add reference to the Microsoft.IdentityModel, System.IdentityModel, and System. Configuration assemblies