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

.NET Interactive extension fails to load #67

Closed
WalternativE opened this issue Mar 28, 2021 · 10 comments
Closed

.NET Interactive extension fails to load #67

WalternativE opened this issue Mar 28, 2021 · 10 comments

Comments

@WalternativE
Copy link
Contributor

Description

Updates in the .NET Interactive kernel extension packages broke the current interactive version.

Repro steps

  1. Create a new notebook with .NET Interactive (or open an old one)
  2. Reference Plotly.NET.Interactive, 2.0.0-beta7 (or lower)

Expected behavior

The interactive extension should load and display a message where it tells me, that it will handle charts.

Actual behavior

image

Known workarounds

Use an older version of .NET Interactive.

Related information

  • Operating system: Windows 10 20H2
  • Branch: loaded from NuGet (but reproducible in dev)
  • .NET Runtime, CoreCLR or Mono Version: NET5
@WalternativE
Copy link
Contributor Author

Fixed with the release of https://www.nuget.org/packages/Plotly.NET.Interactive/2.0.0-beta8 👍

@xqguo
Copy link

xqguo commented Mar 30, 2021

beta8 seems to refer to an unpublished dependency version.
error NU1102: Unable to find package Microsoft.DotNet.Interactive with version (>= 1.0.0-beta.21176.4)

The latest version on nuget.org is Microsoft.DotNet.Interactive 1.0.0-beta.21155.3

@WalternativE
Copy link
Contributor Author

Does beta7 still work for you or does it fail with the error I reported? A workaround for you right now would be to add those two lines before referencing the Plotly.NET.Interactive package.

#i "nuget:https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json"
#i "nuget:https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json"

Other than that we'd need for the .NET interactive folks to push their beta NuGets to NuGet.org.

@kMutagene
Copy link
Member

@WalternativE If the #i directives work I think those should be added to the docs. I cant test that however because the packages work ootb for me

@WalternativE
Copy link
Contributor Author

Yeah, until the whole .NET Interactive experience is stable there really isn't a way to work with it other than using previews anyway.

I assume they work for you because you built the packages locally on your machine. The NuGet.config in the repo references those package sources. The packages then land in your local cache which will hit before anything else (also from .NET Interactive #r directives. After clearing your local nuget caches with dotnet nuget locals all --clear you should get the same errors (and approximately 5 GB of extra disk space 🙈).

If it still works for you after that you might have an additional source configured in your global NuGet.config. You should be able to see it in the ouput of dotnet nuget list source if it is there.

@xqguo
Copy link

xqguo commented Mar 30, 2021

Does beta7 still work for you or does it fail with the error I reported? A workaround for you right now would be to add those two lines before referencing the Plotly.NET.Interactive package.

#i "nuget:https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet5/nuget/v3/index.json"
#i "nuget:https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json"

Other than that we'd need for the .NET interactive folks to push their beta NuGets to NuGet.org.

This worked fine. Thanks!

@kMutagene
Copy link
Member

@WalternativE I was aware of Nuget.config but not of possible global sources. Here is my dotnet nuget list source output:

1.  nuget.org [Enabled]
    https://api.nuget.org/v3/index.json
2.  Microsoft Visual Studio Offline Packages [Enabled]
    C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\

seems quite normal doesn't it? I can still use all interactive packages fine in blank notebooks created in locations that don't contain any Nuget.config file. It is quite strange.

I will add the #i directives to the docs to offer a straight forward way to fix these problems. Do you have a source on these? My google skills don't seem enough to find documentation for #i "nuget ..."

@WalternativE
Copy link
Contributor Author

@kMutagene I think there is no documentation for this in .NET Interactive but the syntax comes from FSI afaik so it's documented there.

It is still possible, that you restored the packages when you restored the Plotly.NET.Interactive solution. There's a NuGet.config in the folder, so this should work. When you restore packages with NuGet the .NET Core SDK caches them on your disk, so whenever it needs to restore them again it will first try to hit the cache before it goes the long way to the web. .NET Interactive uses a temporary Project file in the background (at least I think it does) and so it also uses the exact same infrastructure.

You can easily check by going to the ~/.nuget/packages folder. You'll most likely will be amazed about how big it is (on my system it currently takes up 12 GB 🙈). I assume the preview package in question will already be there.

@kMutagene
Copy link
Member

So the Cache does not discriminate by source, that makes sense cheers!

@colombod
Copy link

colombod commented Nov 9, 2021

The lastest packages have now been published on nuget.org see https://www.nuget.org/packages/Microsoft.DotNet.Interactive/1.0.0-beta.21554.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants