Skip to content

[dotnet] Add DeployToDevice MSBuild target for 'dotnet run' support#25977

Draft
rolfbjarne wants to merge 1 commit into
mainfrom
dev/rolf/deploy-to-device-target
Draft

[dotnet] Add DeployToDevice MSBuild target for 'dotnet run' support#25977
rolfbjarne wants to merge 1 commit into
mainfrom
dev/rolf/deploy-to-device-target

Conversation

@rolfbjarne

@rolfbjarne rolfbjarne commented Jul 8, 2026

Copy link
Copy Markdown
Member

⚠️ Note to self: needs testing locally ⚠️


Implement the DeployToDevice target as specified in the dotnet run for MAUI spec. This target deploys an already-built app to a device or simulator without rebuilding, enabling the dotnet run --no-build workflow.

The target:

  • Reuses existing GetMlaunchArguments task to compute install arguments
  • Supports both physical devices (--installdev) and simulators (--installsim)
  • Accepts the $(Device) property for device selection
  • Depends on ComputeAvailableDevices for device discovery
  • Only applies to mobile platforms (iOS/tvOS) via SdkIsMobile condition

Fixes #24382

🤖 Pull request created by Copilot

Implement the DeployToDevice target as specified in the dotnet run for
MAUI spec. This target deploys an already-built app to a device or
simulator without rebuilding, enabling the 'dotnet run --no-build'
workflow.

The target:
- Reuses existing GetMlaunchArguments task to compute install arguments
- Supports both physical devices (--installdev) and simulators (--installsim)
- Accepts the $(Device) property for device selection
- Depends on ComputeAvailableDevices for device discovery
- Only applies to mobile platforms (iOS/tvOS) via SdkIsMobile condition

Fixes #24382

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

✅ API diff for current PR / commit

NET (empty diffs)

✅ API diff vs stable

NET (empty diffs)

ℹ️ Generator diff

Generator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes)

Pipeline on Agent
Hash: 08967aaae5c92f56626aac560fe7600a50f32f25 [PR build]

@vs-mobiletools-engineering-service2

Copy link
Copy Markdown
Collaborator

🔥 [CI Build #08967aa] Test results 🔥

Test results

❌ Tests failed on VSTS: test results

0 tests crashed, 1 tests failed, 198 tests passed.

Failures

❌ Tests on macOS Tahoe (26) tests

1 tests failed, 4 tests passed.

Failed tests

  • macOS/osx-arm64 monotouch-test: Failed (exit code 137)
    • No test failure details available. Output tail:
      • 2026-07-08 12:20:12.274 monotouchtest[45636:18346696] CFSocketSetAddress listen failure: 102
      • 2026-07-08 12:20:12.288 monotouchtest[45636:18346696] CFSocketSetAddress listen failure: 102
      • 2026-07-08 12:20:12.302 monotouchtest[45636:18346696] CFSocketSetAddress listen failure: 102
      • 2026-07-08 12:20:12.316 monotouchtest[45636:18346696] CFSocketSetAddress listen failure: 102
      • 2026-07-08 12:20:12.330 monotouchtest[45636:18346696] CFSocketSetAddress listen failure: 102
      • 2026-07-08 12:20:12.344 monotouchtest[45636:18346696] CFSocketSetAddress listen failure: 102
      • 2026-07-08 12:20:12.358 monotouchtest[45636:18346696] CFSocketSetAddress listen failure: 102
      • 2026-07-08 12:20:12.399 monotouchtest[45636:18346179] CFSocketSetAddress listen failure: 102
      • Execution timed out after 600 seconds.
      • Execution completed with exit code 137

Html Report (VSDrops) Download

Successes

✅ assembly-processing: All 1 tests passed. Html Report (VSDrops) Download
✅ cecil: All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (iOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (MacCatalyst): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (macOS): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (Multiple platforms): All 1 tests passed. Html Report (VSDrops) Download
✅ dotnettests (tvOS): All 1 tests passed. Html Report (VSDrops) Download
✅ framework: All 2 tests passed. Html Report (VSDrops) Download
✅ fsharp: All 4 tests passed. Html Report (VSDrops) Download
✅ generator: All 5 tests passed. Html Report (VSDrops) Download
✅ interdependent-binding-projects: All 4 tests passed. Html Report (VSDrops) Download
✅ introspection: All 4 tests passed. Html Report (VSDrops) Download
✅ linker (iOS): All 15 tests passed. Html Report (VSDrops) Download
✅ linker (MacCatalyst): All 15 tests passed. Html Report (VSDrops) Download
✅ linker (macOS): All 21 tests passed. Html Report (VSDrops) Download
✅ linker (tvOS): All 15 tests passed. Html Report (VSDrops) Download
✅ monotouch (iOS): All 18 tests passed. Html Report (VSDrops) Download
✅ monotouch (MacCatalyst): All 17 tests passed. Html Report (VSDrops) Download
✅ monotouch (macOS): All 18 tests passed. Html Report (VSDrops) Download
✅ monotouch (tvOS): All 18 tests passed. Html Report (VSDrops) Download
✅ msbuild: All 2 tests passed. Html Report (VSDrops) Download
✅ sharpie: All 1 tests passed. Html Report (VSDrops) Download
✅ windows: All 3 tests passed. Html Report (VSDrops) Download
✅ xcframework: All 4 tests passed. Html Report (VSDrops) Download
✅ xtro: All 1 tests passed. Html Report (VSDrops) Download

macOS tests

✅ Tests on macOS Monterey (12): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Ventura (13): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Sonoma (14): All 5 tests passed. Html Report (VSDrops) Download
✅ Tests on macOS Sequoia (15): All 5 tests passed. Html Report (VSDrops) Download

Linux Build Verification

Linux build succeeded

Pipeline on Agent
Hash: 08967aaae5c92f56626aac560fe7600a50f32f25 [PR build]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a deploy target for 'dotnet deploy'

2 participants