build and test - mattchenderson/microsoft-identity-web GitHub Wiki
-
Navigate to the main page for the Microsoft Identity Web repo.
-
From the GitHub UI, click clone or download.
-
Alternatively open a dev command line and run:
git clone https://github.com/AzureAD/microsoft-identity-web.git
The project is cloned into a local folder.
-
Open Microsoft.Identity.Web.sln and build it in Visual Studio 2019. Note the Troubleshooting building in Visual Studio section below.
-
Alternatively, open a dev command line and build with
dotnet build Microsoft.Identity.Web.sln
or just,
dotnet build
You won't be able to run the Integration tests because they require access to a Microsoft Key Vault 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
From Visual Studio or from the command line. If you wish to control the versioning, use the p:ClientSemVer
property
dotnet pack -p:ClientSemVer=1.0.0
If you executed the command above, you'll find the NuGet packages generated under:
- src\Microsoft.Identity.Web\bin\Debug\Microsoft.Identity.Web.1.0.0.nupkg
- src\Microsoft.Identity.Web.UI\bin\Debug\Microsoft.Identity.Web.UI.1.0.0.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.1.0.0.snupkg
- src\Microsoft.Identity.Web.UI\bin\Debug\Microsoft.Identity.Web.UI.1.0.0.snupkg
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 on your machine
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.
For the moment, Microsoft.Identity.Web leverages a preview version of .NET 5.0. To build in Visual Studio, you will need to enable Visual Studio to use preview SDKs. For this go to Tools | Options | Environment| Preview features | Use previews of the .NET Core SDK (requires restart), and restart Visual Studio.