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

[Xamarin.Android.Build.Tasks] implement dotnet run with an MSBuild target #9470

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Commits on Oct 30, 2024

  1. [Xamarin.Android.Build.Tasks] implement dotnet run with an MSBuild …

    …target
    
    Context: dotnet/sdk#42155
    Context: dotnet/sdk#42240
    Fixes: dotnet/sdk#31253
    
    The .NET SDK has introduced a new `ComputeRunArguments` MSBuild target
    that allows you to set `$(RunCommand)` and `$(RunArguments)` in a more
    dynamic way.
    
    So, on Android:
    
    * `ComputeRunArguments` depends on `Install`, so the app is deployed,
      the `<FastDeploy/>` MSBuild target runs, etc.
    
    * `$(RunCommand)` is a path to `adb`
    
    * `$(RunArguments)` is an `shell am start` command to launch the main
      activity.
    
    The new implementation also allows us to use the `-p` parameter with
    `dotnet run`, such as:
    
        dotnet run -bl -p:AdbTarget=-d
    
    This will pass `-d` to `adb`, which allows you to select an attached
    device if an emulator is running.
    
    Previously, we had no way to pass `-p` arguments to `dotnet run`.
    jonathanpeppers committed Oct 30, 2024
    Configuration menu
    Copy the full SHA
    8836846 View commit details
    Browse the repository at this point in the history

Commits on Oct 31, 2024

  1. Add test

    jonathanpeppers committed Oct 31, 2024
    Configuration menu
    Copy the full SHA
    4db2cb8 View commit details
    Browse the repository at this point in the history