設定裝置並安裝 Azure Sphere SDKSet up your device and install the Azure Sphere SDK

在開發或部署 Azure Sphere 的應用程式之前,您必須先設定面板並安裝軟體。Before you can develop or deploy applications for Azure Sphere, you must first set up your device and install the software.

必要條件:Prerequisites:

  • Azure Sphere 開發套件An Azure Sphere Development Kit
  • 執行 Windows 10 年度更新版或較新版本的電腦A PC running Windows 10 Anniversary Update or later
  • 電腦上有未使用的 USB 連接埠An unused USB port on the PC
  • Visual Studio 2019 Enterprise、Professional 或 Community 16.04 版或更新版本,或是 Visual Studio 2017 15.9 版或更新版本。Visual Studio 2019 Enterprise, Professional, or Community version 16.04 or later; or Visual Studio 2017 version 15.9 or later. 若要安裝 Visual Studio,請選取要安裝的版本,然後執行安裝程式。To install Visual Studio, select the edition to install and then run the installer. 您可以安裝任何工作負載,或不安裝工作負載。You can install any workloads, or none.

連線至 Azure Sphere 裝置Connect the Azure Sphere device

將裝置透過 USB 連接至電腦。Connect your device to your PC through USB. 插入時,裝置會提供三個 COM 連接埠。When plugged in, the device exposes three COM ports.

首次插入裝置時,系統應該會自動下載並安裝驅動程式。The first time you plug in the device, the drivers should be automatically downloaded and installed. 安裝作業可能會很慢;如果驅動程式未自動安裝,請在 [裝置管理員] 中以滑鼠右鍵按一下裝置名稱,然後選取 [更新驅動程式] 。Installation can be slow; if the drivers are not installed automatically, right-click on the device name in Device Manager and select Update driver. 或者,您可以從 Future Technology Devices International (FTDI) 下載驅動程式。Alternatively, you can download the drivers from Future Technology Devices International (FTDI). 選擇符合您 Windows 安裝 (32 或 64 位元) 的驅動程式。Choose the driver that matches your Windows installation (32- or 64-bit).

若要確認是否已安裝,請開啟 [裝置管理員] 並尋找三個 COM 連接埠。To verify installation, open Device Manager and look for three COM ports. 您 COM 連接埠上的數字可能與圖中的不同。The numbers on your COM ports may be different from those in the figure.

裝置管理員與三個 COM 連接埠

如果發生其他錯誤,或如果您看到少於三個 COM 通訊埠,請參閱安裝疑難排解以取得協助。If other errors occur, or if you see fewer than three COM ports, see Troubleshoot Installation for help.

安裝適用於 Visual Studio 的 Azure Sphere SDK 預覽版Install the Azure Sphere SDK Preview for Visual Studio

適用於 Visual Studio 的 Azure Sphere SDK 預覽版包括:The Azure Sphere SDK Preview for Visual Studio includes:

  • Azure Sphere 開發人員命令提示字元,位在 [Azure Sphere] 下方的 [開始] 功能表中A custom Azure Sphere Developer Command Prompt, which is available in the Start menu under Azure Sphere

  • azsphere 命令列公用程式,用於管理裝置、映像和部署The azsphere command-line utility for managing devices, images, and deployments

  • 用於應用程式開發的程式庫Libraries for application development

  • 可支援 Azure Sphere 開發的 Visual Studio 擴充功能Visual Studio extensions to support Azure Sphere development

Azure_Sphere_SDK_Preview_for_Visual_Studio.exe 會安裝完整的 Azure Sphere 軟體開發套件 (SDK)。Azure_Sphere_SDK_Preview_for_Visual_Studio.exe installs the complete Azure Sphere software development kit (SDK).

若要安裝 SDK:To install the SDK:

  1. 從 Visual Studio Marketplace 下載適用於 Visual Studio 的 Azure Sphere SDK 預覽版 (如果您還沒有這麼做)。Download the Azure Sphere SDK Preview for Visual Studio from Visual Studio Marketplace if you have not already done so. 將下載的檔案儲存在電腦上。Save the downloaded file on your PC. SDK 需要 Visual Studio 2017 15.9 版或更新版本,或是 Visual Studio 2019 16.04 版或更新版本。The SDK requires Visual Studio 2017, version 15.9 or later, or Visual Studio 2019, version 16.04 or later.

  2. 執行下載項目中的 Azure_Sphere_SDK_Preview_for_Visual_Studio.exe,以安裝 SDK。Run Azure_Sphere_SDK_Preview_for_Visual_Studio.exe from the download to install the SDK. 同意授權條款並選取 [下一步] 。Agree to the license terms and select Next.

    開發人員工具的設定方塊

  3. 按一下 [安裝] 開始進行安裝。Click Install to begin installation.

    TAP 安裝提醒))

    如果您所安裝的 Visual Studio 版本過舊,或是剛剛才首次安裝 Visual Studio,則可能會出現「沒有可安裝 SDK 的產品」訊息。The message "No product to install SDK on" may appear if the installed version of Visual Studio is too old, or if you have just installed Visual Studio for the first time. 如果您看到此訊息,請視需要更新您的 Visual Studio 安裝,或在重新啟動電腦後返回此步驟。If you see this message, either update your Visual Studio installation if necessary or restart your PC and return to this step.

  4. 接受提高權限提示 (如果有出現的話)。Accept the elevation prompt if one appears.

  5. 安裝完成後,請重新啟動您的電腦 (若安裝應用程式有此要求的話)。When setup completes, restart your PC if the setup application requests it. SDK 會安裝在您電腦上所有相容的 Visual Studio 版本中。The SDK is installed to all compatible editions of Visual Studio on your PC.

如果安裝程式會傳回錯誤,請嘗試解除安裝,然後再重新安裝這些工具。If the installer returns errors, try uninstalling and then reinstalling the tools. 若要解除安裝這些工具,請重新執行安裝程式,或使用 [設定] 中的 [新增或移除程式] 。To uninstall the tools, rerun the installer or use Add and Remove Programs in Settings.

後續步驟Next Steps