This document describes how to prepare your development environment to build and use the Microsoft Azure IoT device client SDK for .NET
- Prerequisites required to build the SDK
- [Optional prerequisites required to test Xamarin and Windows IoT(#advanced)
- Test prerequisites
The following prerequisites are the minimum required to build and produce IoT SDK binaries. Visual Studio is not required to build the SDK. This may not be sufficient to run certain samples that require Visual Studio and other SDKs or frameworks installed on your machine.
- Install the latest .NET Core from https://dot.net
- Install .NET Framework 4.7.2 Developer Pack: https://dotnet.microsoft.com/download/dotnet-framework/net472
- Install .NET Framework 4.5.1 Developer Pack: https://www.microsoft.com/en-us/download/details.aspx?id=40772
- As admin (one-time setup):
Enable Powershell script execution on your system. See http://go.microsoft.com/fwlink/?LinkID=135170 for more information.
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned
- Install Powershell https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell?view=powershell-6
- Install the latest .NET Core SDK CLI https://dotnet.microsoft.com/download
- Install Visual Studio 2017. You can use the Visual Studio Community Free download if you meet the licensing requirements.
- During the installation of Visual Studio 2017, we found that selecting the following workloads and components helps in running and debugging the SDK.
Install the Microsoft IoT Windows Core Project Templates for Visual Studio 2017 from the Extension Marketplace: https://marketplace.visualstudio.com/items?itemName=MicrosoftIoT.WindowsIoTCoreProjectTemplatesforVS15
- .NET MicroFramework is no longer supported in the SDK.
Each test project that requires additional changes to your machine contains a prerequisites
folder. Please follow the instructions within that folder on how to set-up your machine in order to successfully run our tests.
Run the following as admin: iothub\service\tests\prerequisites\windows_install.cmd
-
Create copies of the prerequisite scripts in a separate folder (optionally include this folder in your PATH environment variable for easy access.
- Windows: copy
e2e/test/prerequisites/iot_config.cmd_template
to a folder in your PATHiot_config.cmd
- Linux/OSX: copy
e2e/test/prerequisites/iot_config.sh_template
toiot_config.sh
- Windows: copy
Do not check-in these files after you have edited them as they contain your account's secrets such as connection strings.
-
Add the variables to your environment
- Windows: run
iot_config.cmd
- Linux: dot-source the config file:
. iot_config.sh
- Windows: run
-
Run the e2e tests or launch Visual Studio from the same command prompt/terminal.