conan-io / conan-vs-extension

Conan Extension for Visual Studio
https://marketplace.visualstudio.com/items?itemName=conan-io.conan-vs-extension
MIT License
59 stars 34 forks source link

Support custom commands in 'conan.config.json' #171

Closed jgsogo closed 8 months ago

jgsogo commented 5 years ago

We already have a conan.config.json file we can use to add custom commands to the extension. The user would be able to:

{
  "commands": {
    "<project-pattern>::configuration": {
      "My command": "do wathever thing",
      "Other command": "do wathever thing"
    },
    "ThisProject::Release|Win32": {
      "install": "$(conan) config install $(conanfile) -r myremote",
      "My command": "different for this project"
    }
  }
}

The UI should be quite straightforward using the context menu:

[Project (right click)]
+-- Install (Current project)  // This will run the `install` command
+-- Conan
    +-- My command
    +-- Other command

The main problem I can think about is that we should recreate the menus with every configuration change, although it might not be a bid deal.

wdyt?