microsoft / NLU.DevOps

Tools supporting continuous integration and deployment for NLU services.
MIT License
36 stars 24 forks source link

Adds support for running from .NET tool manifest #325

Closed rozele closed 4 years ago

rozele commented 4 years ago

Previously, the service resolver only worked when an include path was provided or the .NET CLI tool for dotnet-nlu was either installed to a tool path or globally. This change adds support for running the dotnet-nlu CLI tool from a local tool configured in a tool manifest. See documentation for details.

E.g., to run the mock command, you can create a .config/dotnet-tools.json file with the following contents:

{
  "version": 1,
  "isRoot": true,
  "tools": {
    "dotnet-nlu-mock": {
      "version": "0.7.5",
      "commands": [
        "dotnet-nlu-mock"
      ]
    },
    "dotnet-nlu": {
      "version": "0.7.5",
      "commands": [
        "dotnet-nlu"
      ]
    }
  }
}

When you run dotnet tool restore, it will install packages to the NuGet cache. This change needs to ensure the correct version from the tools manifest.

Fixes #324