Skip to content

Loading nuget package in FSI fails when a source path contains accentuated character #12401

Closed

Description

@JDiLenarda

In the Visual Studio (2019 or 2022) Nuget package manager, add 2 sources :

C:\nuget\rihanna
C:\nuget\beyoncé

Create the underlying directories as well.

Then in Visual Studio FSI Window, type :

#r "nuget: Newtonsoft.Json";;

You will get :

stdin(1,1): error FS3217: The source directory 'C:\Nuget\beyonc%EF%BF%BD' not found

Notes :

  • the package that is tried to be load is not supposed to be found in any local package.
  • you get the error even if the faulty source is unticked in the package manager. You have to remove it.

So there are probably 2 bugs :

  • Visual Studio FSI has problem with nuget package source containing accentuated character (or at least 'é')
  • Visual Studio FSI try to connect to every package source from the package manager, even unticked ones.

Windows 10.0.18363, set to fr-FR culture
Visual Studio 2019 16.11.6
F# Interactive version 11.4.2.0 pour F# 5.0

Maybe related to #11392

Activity

  1. KevinRansom commented on Nov 16, 2021

    @KevinRansom
    Contributor

    @JDiLenarda ,

    Thanks for reporting this, the restore source is not escaped, when included for resolution. We will address this.

    Thanks,

    Kevin

  2. added
    Impact-High(Internal MS Team use only) Describes an issue with extreme impact on existing code.
    on Nov 16, 2021
  3. removed
    Impact-High(Internal MS Team use only) Describes an issue with extreme impact on existing code.
    on Mar 9, 2022
  4. JDiLenarda commented on Jul 8, 2022

    @JDiLenarda
    Author

    I don't know if any progress have been made on this issue, but I just noticed it raises when using #r "nuget: whatever" from a Dotnet Interactive C# cell code. So the problem looks wider than F#, probably from the Nuget Package Manager.

    Edit: it happens in C# Interactive as well. Where should I bring this issue ? Nuget.Client ? Dotnet Interactive ? Csharplang ?

    Edit 2 : pointless remark about C# Interactive stroked, my CSI version doesn't support nuget reference.

  5. vzarytovskii commented on Jul 8, 2022

    @vzarytovskii
    Member

    Edit: it happens in C# Interactive as well. Where should I bring this issue ? Nuget.Client ? Dotnet Interactive ? Csharplang ?

    You mean in the C# cell in the .NET interactive? In this case, I think it's still the dependency manager.

  6. JDiLenarda commented on Jul 8, 2022

    @JDiLenarda
    Author

    @vzarytovskii : in this sentence I meant it happens in CSI, but my bad, CSI doesn't support nuget reference. But as I told in the previous sentence, yes it does happens in C# (and F#) code cells in .NET Interactive.

    FSI error message :
    stdin(1,1): error FS3217: The source directory 'C:\Beyonc%EF%BF%BD' not found

    .NET interactive error message (both C# or F# cell code) :
    Error: PackageManagement Error 3217 Le répertoire source 'C:\Beyonc%EF%BF%BD' est introuvable (same message as FSI except localized)

  7. vzarytovskii commented on Jul 8, 2022

    @vzarytovskii
    Member

    I see, yeah, it sounds like it is handled by dependency manager.

  8. added
    Impact-Low(Internal MS Team use only) Describes an issue with limited impact on existing code.
    on Jul 11, 2022
  9. added this to the Backlog milestone on Sep 21, 2022
  10. modified the milestones: Backlog, .NET 7 on Oct 13, 2022
  11. self-assigned this
    on Oct 13, 2022
  12. moved this from Not Planned to Planned in F# Compiler and Toolingon Oct 13, 2022
  13. KevinRansom commented on Nov 17, 2022

    @KevinRansom
    Contributor

    The dependency manager is an FSI component that is used by dotnet interactive to handle package management. Whenever I talk about #r nuget , the dependency manager is what I am talking about, wherever it is surfaced.

  14. KevinRansom commented on Nov 17, 2022

    @KevinRansom
    Contributor

    @JDiLenarda --- This seems to be working for me. Can you verify that you still have an issue with this:

    Thanks

    Kevin

    beyonce

  15. KevinRansom commented on Nov 17, 2022

    @KevinRansom
    Contributor

    Also the disabled sources bug was fixed a few months ago. Thanks

  16. JDiLenarda commented on Nov 20, 2022

    @JDiLenarda
    Author

    @KevinRansom

    It's an improvement on the following points :

    • accented characters are now supported,
    • disabled sources are not searched anymore,
    • also impacts dotnet Interactive.

    But if the source is unreachable, I get an error error FS3217: The source directory '\\network\repos' not found. IMHO, that would be better as a warning, then produce an error if a package itself is unreachable. That point being outside the scope of the described issue, I'm closing it anyway.

  17. Repository owner moved this from Planned to Done in F# Compiler and Toolingon Nov 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

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

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions