Skip to content

dotnet fsi fail to load nuget package in dotnet SDK 7.0.302 #15294

@albertwoo

Description

@albertwoo

dotnet fsi fail to load nuget pacakge in donet SDK 7.0.302, I also tried the dotnet 8 preview 4, and the error is the same. It worked in 7.0.203 and older versions.

Repro steps

  1. Make sure you are using 7.0.302: dotent --version

  2. Run: dotnet fsi

  3. Run: #r "nuget:NBomber";;

    Or try other nuget packages, like Fun.Build

You will get below error:

#r "nuget:NBomber"
^^^^^^^^^^^^^^^^^^
stdin(1,1): error FS3217: C:\Users\woo.packagemanagement\nuget\Projects\1220--24e02601-e93e-4b40-a9bf-33a26d273aa0\Project.fsproj : error NU1101: 找不到包 NBomber。源 C:\Program Files\dotnet\library-packs, C:\Program Files\dotnet\sdk\8.0.100-preview.4.23260.5\FSharp\library-packs 中不存在具有此 ID 的包

Expected behavior

Should work as before

Actual behavior

Throw error

Known workarounds

Sometimes, if you attach specific version it may work, but not always. And if you are using dotnet fsi xxx.fsx and the nuget package is used in the fsx file, then most of the chance it will not work.

Related information

Provide any related information (optional):

  • Windows 11 and MacOS
  • dotnet sdk 7.0.302

Metadata

Metadata

Assignees

Labels

Area-FSIBugImpact-Low(Internal MS Team use only) Describes an issue with limited impact on existing code.

Type

No type

Projects

Status

Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions