4

我们使用常规dotnet-tools.json为我们的项目设置我们的 dotnet 本地工具,但想知道是否有一种方法可以使用通配符版本作为版本号,就像您可以在 csprojs 中使用包引用所做的那样?

<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.0-rc.1.*" />

我尝试将其更改dotnet-tools.json为以下内容:

{
  "version": 1,
  "isRoot": true,
  "tools": {
    "dotnet-ef": {
      "version": "5.0.0-rc.1.*",
      "commands": [
        "dotnet-ef"
      ]
    }
  }
}

但是运行dotnet tool restore会出现以下错误

Invalid manifest file. Path C:\dev\x\x.api\.config\dotnet-tools.json:
        In package dotnet-ef:
                Version 5.0.0-rc.1.* is invalid.
4

0 回答 0