JaneySprings / DotNet.Meteor

A VSCode extension that can run and debug .NET apps (Xamarin, MAUI, Avalonia)
https://marketplace.visualstudio.com/items?itemName=nromanov.dotnet-meteor
MIT License
269 stars 10 forks source link

[Enhancement] Additional parameters in default config #100

Closed yurkinh closed 4 months ago

yurkinh commented 4 months ago

Hello, First of all, I want to thank you for this wonderful tool!

Every time running app in debug or release modes using default config { "name": ".NET Meteor Debugger", "type": "dotnet-meteor.debugger", "request": "launch", "preLaunchTask": "dotnet-meteor: Build"
}
we are getting get command line like this: dotnet build /projectPath/myprject.csproj -p:Configuration=Release -p:TargetFramework=net8.0-android -p:AndroidSdkDirectory=/Users/currentUser/Library/Developer/Xamarin/android-sdk-macosx -p:EmbedAssembliesIntoApk=true

How can I modify it to change/remove existing parameters (for ex: -p:EmbedAssembliesIntoApk=false) or to add some additional one?

JaneySprings commented 4 months ago

Hi @yurkinh ! Yes, you can check the following wiki: https://github.com/JaneySprings/DotNet.Meteor/wiki/Predefined-task-customization#сustomize-the-default-build-task

Just add tasks.json file with the following content:

{
    "version": "2.0.0",
    "tasks": [
        {
            "type": "dotnet-meteor.task",
            "target": "build",
            "problemMatcher": [
                "$dotnet-meteor.problemMatcher"
            ],
            "label": "dotnet-meteor: Build",
            // Custom arguments here
            "args": [
                "-p:MyProperty=Value",
                // Overrides the default property value
                "-p:EmbedAssembliesIntoApk=false"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            }
        }
    ]
}
yurkinh commented 4 months ago

Great! Thanks for the fast response!