-
Couldn't load subscription status.
- Fork 236
Add Android CLI build and deployment documentation #3039
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
base: main
Are you sure you want to change the base?
Conversation
|
Learn Build status updates of commit fa11f3a: ✅ Validation status: passedFor more details, please refer to the build report. |
Co-authored-by: jfversluis <[email protected]>
|
Learn Build status updates of commit adb840e: ❌ Validation status: errorsPlease follow instructions here which may help to resolve issue.
docs/android/cli.md
For more details, please refer to the build report. Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them. |
Co-authored-by: jfversluis <[email protected]>
This comment was marked as outdated.
This comment was marked as outdated.
|
Learn Build status updates of commit 40951d6: ✅ Validation status: passed
For more details, please refer to the build report. |
PoliCheck Scan ReportThe following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 issues. Other issues are also a high priority. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans. ✅ No issues foundMore information about PoliCheckInformation: PoliCheck | Severity Guidance | Term |
|
Co-authored-by: jfversluis <[email protected]>
Fixed both issues in commit 544a0e6:
The documentation now validates cleanly with markdownlint and uses the current .NET 10 target framework. |
PoliCheck Scan ReportThe following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 issues. Other issues are also a high priority. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans. ✅ No issues foundMore information about PoliCheckInformation: PoliCheck | Severity Guidance | Term |
|
Learn Build status updates of commit 544a0e6: ✅ Validation status: passed
For more details, please refer to the build report. |
PoliCheck Scan ReportThe following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 issues. Other issues are also a high priority. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans. ✅ No issues foundMore information about PoliCheckInformation: PoliCheck | Severity Guidance | Term |
|
Learn Build status updates of commit 544a0e6: ✅ Validation status: passed
For more details, please refer to the build report. |
|
@copilot can you check your use of |
Co-authored-by: jfversluis <[email protected]>
You're absolutely correct. Changed to
Also updated all commands from |
PoliCheck Scan ReportThe following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 issues. Other issues are also a high priority. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans. ✅ No issues foundMore information about PoliCheckInformation: PoliCheck | Severity Guidance | Term |
|
Learn Build status updates of commit 7a185d2: ✅ Validation status: passed
For more details, please refer to the build report. |
|
Learn Build status updates of commit 7a185d2: ✅ Validation status: passed
For more details, please refer to the build report. |
PoliCheck Scan ReportThe following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 issues. Other issues are also a high priority. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans. ✅ No issues foundMore information about PoliCheckInformation: PoliCheck | Severity Guidance | Term |
|
@copilot add a note for dotnet run that this works for .NET 10 and up, and that people should use the old command (specify the old command) for anything earlier than .NET 10. |
Co-authored-by: jfversluis <[email protected]>
Added version notes in commit 85d0f5f:
Both notes specify the legacy command |
PoliCheck Scan ReportThe following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 issues. Other issues are also a high priority. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans. ✅ No issues foundMore information about PoliCheckInformation: PoliCheck | Severity Guidance | Term |
|
@copilot please add the dotnet run note closer to the initial use of this command. Additionally, why is the change in the .gitignore file necessary? |
|
Learn Build status updates of commit af77b1c: ✅ Validation status: passed
For more details, please refer to the build report. |
PoliCheck Scan ReportThe following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 issues. Other issues are also a high priority. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans. ✅ No issues foundMore information about PoliCheckInformation: PoliCheck | Severity Guidance | Term |
|
Learn Build status updates of commit af77b1c: ✅ Validation status: passed
For more details, please refer to the build report. |
Co-authored-by: jfversluis <[email protected]>
Moved the note in commit 3e8f857 - it now appears immediately after the code block where Regarding the .gitignore change: It was added to prevent accidentally committing node_modules and npm files (package.json, package-lock.json). These were temporarily created when I installed markdownlint-cli2 for validation in an earlier commit. The .gitignore addition ensures these build/validation artifacts won't be committed to the repo in the future. |
|
@copilot undo the .gitignore change |
PoliCheck Scan ReportThe following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 issues. Other issues are also a high priority. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans. ✅ No issues foundMore information about PoliCheckInformation: PoliCheck | Severity Guidance | Term |
|
Learn Build status updates of commit 8641017: ✅ Validation status: passed
For more details, please refer to the build report. |
Co-authored-by: jfversluis <[email protected]>
Reverted .gitignore changes in commit 4e7e3c9. |
|
Learn Build status updates of commit a0d1c3b: ✅ Validation status: passed
For more details, please refer to the build report. |
PoliCheck Scan ReportThe following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 issues. Other issues are also a high priority. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans. ✅ No issues foundMore information about PoliCheckInformation: PoliCheck | Severity Guidance | Term |
|
@jonathanpeppers does this look good? |
| 5. Alternatively, if you have multiple devices or emulators connected, specify the device identifier with the `-s` flag: | ||
|
|
||
| ```dotnetcli | ||
| dotnet run -f net10.0-android -p:AdbTarget="-s 1A2B3C4D5E6F" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this actually work on Windows? powershell & cmd?
I think you might have to escape the quotes or put %20 for the space character.
| For more information about Android deployment and debugging, see [Android deployment](~/android/deployment/index.md). | ||
|
|
||
| > [!NOTE] | ||
| > The `dotnet run` command is supported for .NET for Android projects starting in .NET 10. For .NET 9 and earlier versions, use `dotnet build -t:Run` with the appropriate target framework (for example, `dotnet build -t:Run -f net9.0-android`). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dotnet run has the same implementation in .NET 9 and 10. Does it not work for you in .NET 9?
| 2. To run your app on a specific emulator, use the `AdbTarget` property with the `-s` flag and the emulator identifier: | ||
|
|
||
| ```dotnetcli | ||
| dotnet run -f net10.0-android -p:AdbTarget="-s emulator-5554" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one, too, I question if this works on Windows, the space character & quotes.
| 3. Alternatively, you can use the `-e` flag to run on the only running emulator: | ||
|
|
||
| ```dotnetcli | ||
| dotnet run -f net10.0-android -p:AdbTarget=-e |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In all of these, it mentions $(AdbTarget), but isn't it actually $(_AdbTarget) with a leading underscore?
This means it is a private MSBuild property, should we document it?
We are working on this in .NET 11:
AndroidDeviceUsbwithAdbTargetproperty (official .NET 10 property)dotnet build -t:Runtodotnet run(official .NET 10 approach)-d(device),-e(emulator),-s(specific)Summary
This PR adds comprehensive Android CLI documentation matching the iOS CLI documentation structure. Key features include:
New Documentation File:
docs/android/cli.mddotnet run -f net10.0-androiddotnet runsupport (.NET 10+) and legacy command usage (.NET 9 and earlier)Key Commands Documented:
Navigation Updates: Added the new CLI documentation to
TOC.ymlin the Android section, positioned consistently with the iOS CLI documentation.The documentation uses the officially supported
AdbTargetproperty (documented in .NET 10 what's new) which maps directly to adb command-line arguments, providing a clean and standard interface for device and emulator targeting.Fixes #2936.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.
Internal previews