Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A compile error form example AzureIoT #33

Closed
david-foo opened this issue Mar 28, 2019 · 2 comments
Closed

A compile error form example AzureIoT #33

david-foo opened this issue Mar 28, 2019 · 2 comments

Comments

@david-foo
Copy link

david-foo commented Mar 28, 2019

I'm try to build the example code AzureIoT but was stoped when click the build button on the very beginning. Is it because of authorization or authentication on my account or PC/network? But at least the compiling should be OK, and the error may happen at run-time, is that right?

Severity Code Description Project File Line Suppression State
Error MSB3073 The command "%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -NoProfile -NonInteractive -File "D:\azure-sphere-samples\Samples\AzureIoT\AzureIoT\script\validate_manifest.ps1
:VCEnd" exited with code 1. AzureIoT C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Microsoft.CppCommon.targets 133

@richardtaylorrt
Copy link
Contributor

Hi - you need to configure the app to work with your IoT Central or to work with your IoT Hub.

If you switch to the "Output -> Build" panel in Visual Studio, you will see this advice:

1>------ Build started: Project: AzureIoT, Configuration: Debug ARM ------
1>Validating project app_manifest.json
1>CmdArgs is empty, this needs to contain the ScopeId for your IoT Hub/Central application
1>The app_manifest.json 'AllowedConnections' needs to contain:
1>  Your IoT Hub/Central application Endpoint address
1>The app_manifest.json file contains a placeholder 'DeviceAuthentication'
1>this needs to be replaced with your Azure Sphere Tenant Id
1>This can be obtained using the Azure Sphere Developer Command Prompt
1>'azsphere tenant show-selected'
...
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Please let us know if this solves the problem, thanks.

@david-foo
Copy link
Author

@richardtaylorrt
Thank you. The content in app_manifest.json can not be left blank when build the code. Now the demo code can runs with IoT central.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants