I ran the templates from AzureAD/microsoft-identity-web for Razor Pages:
dotnet new webapp2 --auth IndividualB2C
Which created a project using
// This method gets called by the runtime. Use this method to add services to the container.
public void ConfigureServices(IServiceCollection services)
{
services.AddSignIn(Configuration, "AzureAdB2C");
services.AddRazorPages()
.AddMicrosoftIdentityUI();
}
But I looked into the .csproj file and saw:
<ItemGroup>
<PackageReference Include="Microsoft.Identity.Web" Version="0.1.2-preview"/>
<PackageReference Include="Microsoft.Identity.Web.UI" Version="0.1.2-preview"/>
</ItemGroup>
So I upgraded them as it looks like the new version for Microsoft.Identity.Web was GA'd at 1.0.0. Now the line:
services.AddSignIn(Configuration, "AzureAdB2C");
Has this error:
'IServiceCollection' does not contain a definition for 'AddSignIn' and no accessible extension method 'AddSignIn' accepting a first argument of type 'IServiceCollection' could be found (are you missing a using directive or an assembly reference?)