Skip to content
This repository has been archived by the owner on Jun 30, 2023. It is now read-only.

Pre requisites to build ADAL.NET and MSAL.NET

Bogdan Gavril edited this page Oct 25, 2018 · 21 revisions

Components required to build the library

The following are instructions to setup Visual Studio to build the Combined.NoWinRT.sln

Minimal Visual Studio 2017 installation

  • Install or update Visual Studio 2017 with the following workloads:

    • Universal Windows Platform
    • Mobile Development with .NET
    • .NET Core cross-platform development
  • Then from the "Individual Components" tab,make sure these additional items are selected:

    • .NET Framework 4.5 targeting pack
    • .NET Framework 4.5.2 targeting pack
    • .NET Framework 4.6.1 SDK
    • .NET Framework 4.6.1 targeting pack
    • .NET Framework 4.6.2 targeting pack
    • Android SDK setup (API level 27)
  • Android SDK level 24 and 26 are also required. These are not installed through the VS Installer, so instead use the Android SDK Manager (Visual Studio > Tools > Android > Android SDK Manager…)

Troubleshooting

  • If you get an exception similar to "System.InvalidOperationException: Could not determine Android SDK location" while restoring the NuGet packages, make sure you have the latest Android SDK installed (27 at the time of writing). If you do, you probably hit a bug with the VS installer - uninstall and reinstall the SDK from the Visual Studio Installer.
  • If you get exceptions requiring you to install netcore4.5, this can only be fixed by installing Visual Studio 2015
  • IF you get an exception similar to "{System.TypeLoadException: Could not set up parent class, due to: Could not load type of field 'Microsoft.Identity.Core.UI.WebviewBase:asWebAuthenticationSession' (5) due to: Could not resolve type with token 0100004c from typeref (expected class 'AuthenticationServices.ASWebAuthenticationSession' in assembly 'Xamarin.iOS" when running on an iOS simulator, make sure that you have installed the latest Visual Studio 2017 (15.8.7 for windows at the time of writing this line item) and at least XCode 10 on the Mac to get the classes needed to run ASWebAuthenticationSession (ex. AuthenticationServices)

VS 2017 troubleshooting tool

If you still get exceptions building the solutions, there is a PS script you can run that will tell you which VS 2017 components you are missing - you can find at /build/dev_box.ps1 (currently in dev branch)

Clone this wiki locally