dotnet / dotnet/fsharp

--preferreduilang appears in fsi.CommandLineArgs when run from Msbuild and .NET 10 SDK

Open
#19,146 3 comments 1 reaction 0 assignees View on GitHub
Bug
Dominant language
F#
Stars
4.3k
Forks
876
Avg merge
4d 11h
Merged PRs (30d)
131

Description

**Repro steps**

Provide the steps required to reproduce the problem:

1. Build the attached FsiBugRepo.csproj from VS 22 or 26. Notice erroneous```--preferreduilang:en-US``` in the output from the fsx script
2. Run the ```dotnet fsi fsi_test.fsx``` from the command line. Notice absence of option. Correct
3. Switch the SDK to the .NET 8 SDK and rebuild from VS. Notice absence of option. Correct.

[FsiBugRepo.zip](https://github.com/user-attachments/files/24085280/FsiBugRepo.zip)

**Expected behavior**

No additional command line args present in ```fsi.CommandLineArgs``` variable.

**Actual behavior**

presence of ```--preferreduilang:en-US``` where it shouldn't be

**Known workarounds**

None except to ignore the extra option.

**Related information**

* Operating system
* Windows 11
* VS 2026 18.1, VS 22 17.14.22
* .NET 10.0.101, .NET 8.0.319

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.