fsprojects / FAKE

FAKE - F# Make
https://fake.build
Other
1.28k stars 582 forks source link

allow newer .NET SDKs with rollForward latestMinor #2749

Closed cataggar closed 9 months ago

cataggar commented 1 year ago

I have 6.0.408 installed, but the global.json limits the SDK to 6.0.101. This allows a newer 6.0.x to work. Avoids this error:

PS C:\Users\cataggar\ms\FAKE> dotnet restore
The command could not be loaded, possibly because:
  * You intended to execute a .NET application:
      The application 'restore' does not exist.
  * You intended to execute a .NET SDK command:
      A compatible .NET SDK was not found.

Requested SDK version: 6.0.101
global.json file: C:\Users\cataggar\ms\FAKE\global.json

Installed SDKs:
6.0.201 [C:\Program Files\dotnet\sdk]
6.0.408 [C:\Program Files\dotnet\sdk]
7.0.302 [C:\Program Files\dotnet\sdk]

Install the [6.0.101] .NET SDK or update [C:\Users\cataggar\ms\FAKE\global.json] to match an installed SDK.
anpin commented 1 year ago

after applying your patch dotnet fake build still tries to install current version of 6.0.101 while I have 6.0.401 installed locally

xperiandri commented 11 months ago

It does not matter The purpose of his change is to allow working in an IDE without having the exact SDK version installed

xperiandri commented 11 months ago

@forki can this be merged ASAP?