NuGet package references fails in dotnet fsi (.net 7.0) when System language is set to a specific language
See original GitHub issueNuGet package references fails in dotnet fsi (.net 7.0) when System-wide language is set to a specific language (e.g. Japanese)
Repro steps
- Set “Windows display language” to “Japanese” (in Windows) / Set “Preferred languages” to “Japanese” (in macOS)
- Start “dotnet fsi” (Using SDK version 7.0.305)
- Execute “#r “nuget: Semver”;;” (any package; not limited to Semver)
- error NU1101 occurs
Expected behavior
in English
Microsoft Windows [Version 10.0.23493.1000]
(c) Microsoft Corporation. All rights reserved.
C:\Users\kenta>powershell -Command Get-WinUserLanguageList | findstr /c:LanguageTag
LanguageTag : en-US
LanguageTag : ja
C:\Users\kenta>dotnet fsi
Microsoft (R) F# Interactive version 12.5.0.0 for F# 7.0
Copyright (c) Microsoft Corporation. All Rights Reserved.
For help type #help;;
> #r "nuget: Semver";;
[Loading C:\Users\kenta\.packagemanagement\nuget\Projects\20000--798a0855-6b74-4361-b791-69faa7249852\Project.fsproj.fsx]
module FSI_0002.Project.fsproj
>
Actual behavior
in Japanese
Microsoft Windows [Version 10.0.23493.1000]
(c) Microsoft Corporation. All rights reserved.
C:\Users\kenta>powershell -Command Get-WinUserLanguageList | findstr /c:LanguageTag
LanguageTag : ja
LanguageTag : en-US
C:\Users\kenta>dotnet fsi
Microsoft (R) F# インタラクティブ バージョン F# 7.0 のための 12.5.0.0
Copyright (C) Microsoft Corporation. All rights reserved.
ヘルプを表示するには次を入力してください: #help;;
> #r "nuget: Semver";;
#r "nuget: Semver";;
^^^^^^^^^^^^^^^^^^
stdin(1,1): error FS3217: C:\Users\kenta\.packagemanagement\nuget\Projects\23104--2559f869-9911-40c0-a971-bd118622b0b0\Project.fsproj : error NU1101: パッケージ Semver が見つかりません。ソース C:\Program Files\dotnet\sdk\7.0.305\FSharp\library-packs には、この ID のパッケージが存在しません。
>
Known workarounds
either
- Set “Windows display language” to “English (United States)”
- use .net 6.0 SDK
Related information
Provide any related information (optional):
- Operating system: Windows 10/11, macOS Ventura (13.4.1)
- .NET Runtime: .net 7.0.305
Issue Analytics
- State:
- Created 2 months ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Nuget package installed but references not resolved
The problem was caused by a bug in Visual Studio where the references are not resolved correctly.
Read more >PackageReference in project files - NuGet
Package references, using <PackageReference> MSBuild items, specify NuGet package dependencies directly within project files, as opposed to ...
Read more >Referencing packages in F# Interactive doesn't work when ...
[severity:It's more difficult to complete my work] According to the official documentation, it should be possible to reference NuGet packages from an F# ......
Read more >Net 7 project use and call .Net Framework 4.6 project - failed
Closure' from assembly 'System.Core' ". To solve the issue I installed the following NuGet packages on the API project: Microsoft.Windows.
Read more >fsautocomplete 0.61.1
A community-developed Language Server Protocol implementation for F#.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The latest version 7.0.400 solves that problem.
Ok, closing it then. I remember Kevin fixing it, wasn’t sure which version included the fix.