Skip to content

Build and Test

Jean-Marc Prieur edited this page Jun 22, 2020 · 14 revisions

Build and Test

  1. Navigate to the main page for Microsoft Identity Web.

  2. From the GitHub UI, click clone or download, and go to a dev command line and run

    git clone https://github.com/AzureAD/microsoft-identity-web.git

the project into a local folder.

  1. Open and build in Visual Studio 2019

  2. Alternatively, build a dev command line with

    dotnet build MicrosoftIdentityWeb.sln

    or just

    dotnet build

Run tests

You won't be able to run the Integration test because they require access to a Microsoft KeyVault which is locked down. These tests run daily as part of our Azure DevOps pipelines.

To run the unit tests from the assembly Microsoft.Identity.Web.Test. For this:

cd tests\Microsoft.Identity.Web.Test
dotnet test

Package Microsoft.Identity.Web

From VS or from the command line. If you wish to control the versioning, use the p:ClientSemVer property

dotnet pack -p:ClientSemVer=0.1.7-preview

If you executed the command above, you'll find the NuGet packages generated under

  • src\Microsoft.Identity.Web\bin\Debug\Microsoft.Identity.Web.0.1.7-preview.nupkg
  • src\Microsoft.Identity.Web.UI\bin\Debug\Microsoft.Identity.Web.UI.0.1.7-preview.nupkg
  • ProjectTemplates\bin\Debug\Microsoft.Identity.Web.ProjectTemplates.0.x.y.nupkg

The symbols are also generated:

  • src\Microsoft.Identity.Web\bin\Debug\Microsoft.Identity.Web.0.1.7-preview.snupkg
  • src\Microsoft.Identity.Web.UI\bin\Debug\Microsoft.Identity.Web.UI.0.1.7-preview.snupkg

Package the project templates

The dotnet core project templates used to create Web apps and web APIs leveraging the Microsoft identity platform are generated by the dotnet pack command above

If you only want to generate these:

cd ProjectTemplates
dotnet pack

Optionally install the project templates:

cd ProjectTemplates\bin\debug
dotnet new -i Microsoft.Identity.Web.ProjectTemplates.0.x.y.nupkg

If, later, you want to uninstall them:

cd ProjectTemplates\bin\debug
dotnet new -u Microsoft.Identity.Web.ProjectTemplates

Note the subtlety: to uninstall the project templates, you don't provide the full name of the file, but only the name without the version and the extension

Getting started with Microsoft Identity Web

Token cache serialization

Web apps

Web APIs

Daemon scenario

Advanced topics

FAQ

News

Contribute

Other resources

Clone this wiki locally