Skip to content

Improve device selection when using 'dotnet run' #23995

@rolfbjarne

Description

@rolfbjarne

Currently selecting which device or simulator to run on when launching from the command line is not ideal:

  • Pass -p:_DeviceName=<udid> when targeting a device
  • Pass -p:_DeviceName=:v2:udid=<udid> when targeting a simulator

This should be unified to have the same format, and also use a non-underscored property name. Maybe also share the property name with Android.

Ideas for the property name:

  • Device: is the simulator a device? Would this be confusing?
  • Target: closer to Android, but seems maybe a bit unspecific?
  • TargetDevice: same as Device, but it's also longer and sounds a bit worse I think
  • other ideas?

Ideas for the format:

Just pass the udid as-is and figure out what to do, so this works on both simulator and device:

$ dotnet run -p:Device=<udid> ...

And "udid" can be the name of the device too, if it's unique.

For reference, I think Android currently does this:

  • -p:AdbTarget=...

References:

CC @jonathanpeppers

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementThe issue or pull request is an enhancement

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions