Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#r nuget directive - strange side effects with Visual Studio Nuget Package Manager #2143

Closed
4 of 13 tasks
JDiLenarda opened this issue Jul 13, 2022 · 3 comments
Closed
4 of 13 tasks
Labels
Area-Packages and Extensions Related to acquiring and using packages and extensions Area-VisualStudio Relating to VisualStudio Notebook Editor extension (deprecated) bug Something isn't working External

Comments

@JDiLenarda
Copy link

Describe the bug

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.

In Visual Studio Code :

  • create a .NET Interactive Notebooks
  • add a C# or F# code cell
  • type #r "nuget: Newtonsoft.Json" and execute
    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 loaded is not supposed to be in any local source directory.
  • you get the error even if the faulty source is unticked in the package manager. The only workaround is to remove it.

I first noticed this bug in F# Interactive a few months back : dotnet/fsharp#12401.
I only realized it was impacting .NET Interactive last week. I filed thid issue on Nuget repo: NuGet/Home#11955.
I've been suggested to report it here.

Please complete the following:

Which version of .NET Interactive are you using? (In a notebook, run the #!about magic command. ):

.NET Interactive notebooks v1.0.3314011

  • OS
    • Windows 11
    • Windows 10
    • macOS
    • Linux (Please specify distro)
    • iOS
    • Android
  • Frontend
    • Jupyter Notebook
    • Jupyter Lab
    • nteract
    • Visual Studio Code: 1.69.0
    • Visual Studio Code Insiders
    • Visual Studio: 2019 (16.11.6)
    • Other : Nuget Package Manager 5.11.0
@jonsequitur jonsequitur added bug Something isn't working Area-VisualStudio Relating to VisualStudio Notebook Editor extension (deprecated) Area-Packages and Extensions Related to acquiring and using packages and extensions labels Jul 13, 2022
@JakeRadMSFT
Copy link

Related to:
dotnet/csharp-notebooks#60

@JDiLenarda
Copy link
Author

I'm upset because I want to push for .NET Interactive use in my company, but this bug is in the way.

I investigated a bit, and it appears that the Nuget repository paths are in a Nuget.Config file sit in %appdata%\NuGet on Windows 10. The path are stored like this :

<add key="My repository" value="c:\Beyoncé" />

I get my error if this key is present, and not if removed or commented. So at one point, those paths are retrieved, but probably read with a bad encoding. But where ? Or since you marked the issue as external, by what, so I know where to file an issue ?

(notice that the 0xEFBFBD code in the stdin(1,1): error FS3217: The source directory 'C:\Nuget\beyonc%EF%BF%BD' not found message is the replacement character �).

@JDiLenarda
Copy link
Author

The related issue in F# Interactive dotnet/fsharp#12401 is corrected, incidentally correcting this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Packages and Extensions Related to acquiring and using packages and extensions Area-VisualStudio Relating to VisualStudio Notebook Editor extension (deprecated) bug Something isn't working External
Projects
None yet
Development

No branches or pull requests

4 participants