question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

NuGet package references fails in dotnet fsi (.net 7.0) when System language is set to a specific language

See original GitHub issue

NuGet package references fails in dotnet fsi (.net 7.0) when System-wide language is set to a specific language (e.g. Japanese)

Repro steps

  1. Set “Windows display language” to “Japanese” (in Windows) / Set “Preferred languages” to “Japanese” (in macOS)
  2. Start “dotnet fsi” (Using SDK version 7.0.305)
  3. Execute “#r “nuget: Semver”;;” (any package; not limited to Semver)
  4. 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:closed
  • Created 2 months ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Mt-SQcommented, Aug 12, 2023

The latest version 7.0.400 solves that problem.

username@penguin:~$ dotnet --info | head -n10
.NET SDK:
 Version:   7.0.400
 Commit:    73bf45718d

ランタイム環境:
 OS Name:     debian
 OS Version:  11
 OS Platform: Linux
 RID:         debian.11-x64
 Base Path:   /usr/share/dotnet/sdk/7.0.400/
username@penguin:~$ dotnet fsi

Microsoft (R) F# インタラクティブ バージョン F# 7.0 のための 12.7.0.0
Copyright (C) Microsoft Corporation. All rights reserved.

ヘルプを表示するには次を入力してください: #help;;

> #r "nuget:FSharp.Data";;
[読み込み中 /home/username/.packagemanagement/nuget/Projects/1354--ba03ed0e-eab1-46ae-b8e3-ff241e8cc9f0/Project.fsproj.fsx]
module FSI_0002.Project.fsproj

>
0reactions
vzarytovskiicommented, Aug 13, 2023

Ok, closing it then. I remember Kevin fixing it, wasn’t sure which version included the fix.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found