dotnet / interactive

.NET Interactive combines the power of .NET with many other languages to create notebooks, REPLs, and embedded coding experiences. Share code, explore data, write, and learn across your apps in ways you couldn't before.
MIT License
2.8k stars 374 forks source link

Restoring interactive notebooks functionality in VSCode (currently not working) #3514

Open eosfor opened 2 months ago

eosfor commented 2 months ago
xtension started for VS Code Stable.
tool-uninstall: Executing [dotnet tool uninstall Microsoft.dotnet-interactive] in 'c:\Users\av\AppData\Roaming\Code\User\globalStorage\ms-dotnettools.dotnet-interactive-vscode'.
tool-uninstall: Finished with code 0.
tool-uninstall: STDOUT:
Tool 'microsoft.dotnet-interactive' was successfully uninstalled and removed from manifest file c:\Users\av\AppData\Roaming\Code\User\globalStorage\ms-dotnettools.dotnet-interactive-vscode\.config\dotnet-tools.json.
tool-install: Executing [dotnet tool install --add-source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json --ignore-failed-sources Microsoft.dotnet-interactive --version 1.0.520801] in 'c:\Users\av\AppData\Roaming\Code\User\globalStorage\ms-dotnettools.dotnet-interactive-vscode'.
tool-install: Finished with code 0.
tool-install: STDOUT:
You can invoke the tool from this directory using the following commands: 'dotnet tool run dotnet-interactive' or 'dotnet dotnet-interactive'.
Tool 'microsoft.dotnet-interactive' (version '1.0.520801') was successfully installed. Entry is added to the manifest file c:\Users\av\AppData\Roaming\Code\User\globalStorage\ms-dotnettools.dotnet-interactive-vscode\.config\dotnet-tools.json.
Started process 20884: dotnet tool run dotnet-interactive -- notebook-parser
Starting kernel for 'file:///c%3A/temp/scripting-notes/notebooks/en/vnet-topology-visualization.ipynb' using: dotnet tool run dotnet-interactive -- [vscode] stdio --working-dir c:\temp\scripting-notes\notebooks\en
Kernel for 'file:///c%3A/temp/scripting-notes/notebooks/en/vnet-topology-visualization.ipynb' started (1888).
process 20884 stderr: Unhandled exception. 
kernel (1888) stderr: Unhandled exception. 
process 20884 stderr: System.IO.FileNotFoundException: Could not load file or assembly 'System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
File name: 'System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
   at Microsoft.DotNet.Interactive.App.Program.Main(String[] args)
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at Microsoft.DotNet.Interactive.App.Program.Main(String[] args)
   at Microsoft.DotNet.Interactive.App.Program.<Main>(String[] args)

kernel (1888) stderr: System.IO.FileNotFoundException: Could not load file or assembly 'System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
File name: 'System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
   at Microsoft.DotNet.Interactive.App.Program.Main(String[] args)
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at Microsoft.DotNet.Interactive.App.Program.Main(String[] args)
   at Microsoft.DotNet.Interactive.App.Program.<Main>(String[] args)

Process 'dotnet' with PID 20884 exited with code 3762504530 and signal null
Started process 21484: dotnet tool run dotnet-interactive -- notebook-parser
Kernel for 'file:///c%3A/temp/scripting-notes/notebooks/en/vnet-topology-visualization.ipynb' ended (1888) with code 3762504530.
process 21484 stderr: Unhandled exception. 
process 21484 stderr: System.IO.FileNotFoundException: Could not load file or assembly 'System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. The system cannot find the file specified.
File name: 'System.CommandLine, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
   at Microsoft.DotNet.Interactive.App.Program.Main(String[] args)
   at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
   at Microsoft.DotNet.Interactive.App.Program.Main(String[] args)
   at Microsoft.DotNet.Interactive.App.Program.<Main>(String[] args)

I even did delete and re-install vscode and polyglot extension - does not work

PS C:\tools> dotnet --info
.NET SDK:
 Version:           8.0.203
 Commit:            5e1ceea679
 Workload version:  8.0.200-manifests.4e94be9c

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.22631
 OS Platform: Windows
 RID:         win-x64
 Base Path:   C:\Program Files\dotnet\sdk\8.0.203\

.NET workloads installed:
There are no installed workloads to display.

Host:
  Version:      8.0.3
  Architecture: x64
  Commit:       9f4b1f5d66

.NET SDKs installed:
  6.0.420 [C:\Program Files\dotnet\sdk]
  7.0.314 [C:\Program Files\dotnet\sdk]
  8.0.103 [C:\Program Files\dotnet\sdk]
  8.0.203 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 6.0.28 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 7.0.17 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 8.0.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 6.0.28 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 7.0.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.NETCore.App 8.0.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 6.0.28 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 7.0.17 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
  Microsoft.WindowsDesktop.App 8.0.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
  None

Environment variables:
  Not set

global.json file:
  Not found

Learn more:
  https://aka.ms/dotnet/info

Download .NET:
  https://aka.ms/dotnet/download

Originally posted by @eosfor in https://github.com/dotnet/interactive/issues/3482#issuecomment-2044039654

eosfor commented 2 months ago

Looks like it is an issue with the latest version of the extension. I switched back to the previous version and it works