Skip to content

Allow dotnet commands to bypass the global.json version check #10311

@forki

Description

@forki

Sometimes users or more importantly CI servers don't have the correct dotnet SDK installed.
We wrote FAKE install scripts that would take care of installing the correct SDK version during the build. Unfortunately even dotnet tool requires to have exactly the specified version available. So we have chicken and egg situation. We can't download the tool that would fix the SDK version conflict since the downloader already requires the correct SDK. What I'd like to see is:

  1. dotnet tool install --any-sdk-version --tool-path tools fake-cli
  2. tools\fake.exe build --target Build
  3. --> FAKE runs and installs the correct SDK with it's own functionality

As written above 1) is already failing since dotnet tool requires the SDK version from global.json

Workaround

  1. Install fake-cli package with Paket or NuGet
  2. dotnet "packages\build\Fake-Cli\tools\netcoreapp2.1\any\fake-cli.dll" build --target Build

Note how this dotnet command does not requirer the correct SDK version.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions