Skip to content

.NET Interactive extension fails to load #67

Closed

Description

@WalternativE

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

Activity

  1. WalternativE commented on Mar 28, 2021

    @WalternativE
    ContributorAuthor
  2. xqguo commented on Mar 30, 2021

    @xqguo

    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

  3. WalternativE commented on Mar 30, 2021

    @WalternativE
    ContributorAuthor

    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.

  4. kMutagene commented on Mar 30, 2021

    @kMutagene
    Collaborator

    @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

  5. WalternativE commented on Mar 30, 2021

    @WalternativE
    ContributorAuthor

    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.

  6. xqguo commented on Mar 30, 2021

    @xqguo

    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!

  7. kMutagene commented on Mar 31, 2021

    @kMutagene
    Collaborator

    @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 ..."

  8. WalternativE commented on Mar 31, 2021

    @WalternativE
    ContributorAuthor

    @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.

  9. kMutagene commented on Mar 31, 2021

    @kMutagene
    Collaborator

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

  10. colombod commented on Nov 9, 2021

    @colombod

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions