FsAutoComplete icon indicating copy to clipboard operation
FsAutoComplete copied to clipboard

Script reference resolution doesn't respect sdk version in global.json

Open pihai opened this issue 4 years ago • 2 comments

After the installation of the .NET 5 preview some existing fsx scripts stopped working because of many different reasons. So I decided to create a global.json file to specify the latest SDK version of the last known working installation.

The correct FSI version is started when I run a script. But the framework references for the script file are always resolved to the most up to date version.

In the code I found that always the lastest installed SDK references are used: https://github.com/fsharp/FsAutoComplete/blob/81145f1f8d56d79e91bc8a95b7a4b5e882099fb1/src/FsAutoComplete.Core/CompilerServiceInterface.fs#L295

Shouldn't this respect the version specified in global.json?

pihai avatar May 04 '20 15:05 pihai

CC: @baronfel

Krzysztof-Cieslak avatar May 04 '20 16:05 Krzysztof-Cieslak

I agree it should respect the global.json-specified-version. The decision we chose to use latest at that point was driven mostly be the fact that dotnet fsi wasn't yet stable, and we wanted to have some version of it be usable before it released. Now that it's a well-known, released component I think it makes sense to adhere to global.json here. I'll work on this today.

baronfel avatar May 05 '20 14:05 baronfel