Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Visual Studio selects the highest version of the sdk installed on the machine when executing scripts in FSI #17307

Open
KevinRansom opened this issue Jun 14, 2024 · 5 comments
Assignees
Labels
Area-VS-FSI VS window and commands for F# Interactive Bug Impact-Low (Internal MS Team use only) Describes an issue with limited impact on existing code.
Milestone

Comments

@KevinRansom
Copy link
Member

KevinRansom commented Jun 14, 2024

This is incorrect behavior, it should select the version of the Sdk that shipped with the VS being executed.

image

Edited:
Okay, the current Fsi behaviour is this, if you start with send to interactive, it uses a global.son when present in the same directory as the script to figure out which Sdk to use.
If you specify nothing it does not use a global.json instead it selects the highest framework installed, which is slightly different to what the Sdk does, it selects the Sdk that was shipped with VS.

I propose changing the no global.json specified mechanism to use the version shipped with that VS. To change the specified VS add a script and include a global.json in the directory containing the script:

When you start an F# interactive session in VS you see this:
image

@baronfel
Copy link
Member

That's debatable - any global.json the user may have would also influence SDK selection and therefore the FSI chosen.

@vzarytovskii
Copy link
Member

That's debatable - any global.json the user may have would also influence SDK selection and therefore the FSI chosen.

This. It should take global json into account. Like it does for building.

@KevinRansom
Copy link
Member Author

@baronfel , @vzarytovskii --- so are you suggesting that what we do now is correct? or perhaps that the actual final implementation requires a more rigourous analysis than is currently described above?

And could you point me to the description of Visual Studios actual behavior so that I can modify the description above.

Thanks

Kevin

@KevinRansom
Copy link
Member Author

image

@KevinRansom
Copy link
Member Author

Okay, the current Fsi behaviour is this, if you start with send to interactive, it uses a global.son when present in the same directory as the script to figure out which Sdk to use.
If you specify nothing it does not use a global.json instead it selects the highest framework installed, which is slightly different to what the Sdk does, it selects the Sdk that was shipped with VS.

I propose changing the no global.json specified mechanism to use the version shipped with that VS. To change the specified VS add a script and include a global.json in the directory containing the script:

When you start an F# interactive session in VS you see this:
image

@abonie abonie added Area-VS-FSI VS window and commands for F# Interactive Impact-Low (Internal MS Team use only) Describes an issue with limited impact on existing code. and removed Needs-Triage labels Jun 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-VS-FSI VS window and commands for F# Interactive Bug Impact-Low (Internal MS Team use only) Describes an issue with limited impact on existing code.
Projects
Status: New
Development

No branches or pull requests

4 participants