FsAutoComplete
FsAutoComplete copied to clipboard
Script reference resolution doesn't respect sdk version in global.json
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?
CC: @baronfel
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.