csharp-notebooks
csharp-notebooks copied to clipboard
Getting alot of Errors: "Kernel Failed To Start."
Have VS2022 installed, installed the Notebook editor extension and just opened the getting started folder and getting the following I was able to build C# Projects with my VS2022 and also C# Interactive windows work in VS2022
Kernel Failed To Start.
Cannot find a tool in the manifest file that has a command named 'dotnet-interactive'.
error: Cannot find a tool in the manifest file that has a command named 'dotnet-interactive'.
at StreamJsonRpc.JsonRpc.<InvokeCoreAsync>d__143`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Notebook.Utils.DetectKernelStatusService.<ExecuteTaskAsync>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Notebook.Utils.RepeatedTimeTaskService.<>c__DisplayClass7_0.<<ExecuteAsync>b__1>d.MoveNext()
error: Cannot find a tool in the manifest file that has a command named 'dotnet-interactive'.
at StreamJsonRpc.JsonRpc.<InvokeCoreAsync>d__143`1.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.VisualStudio.Notebook.Utils.DetectKernelStatusService.<ExecuteTaskAsync>d__3.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
[...]
Thanks for reporting!
I haven’t seen that one before - can you share what VS version you have installed and which .NET versions?
The extension should ensure the right versions of both are on your machine but perhaps it’s not sending commands to the right .NET version.
I haven’t seen that one before - can you share what VS version you have installed and which .NET versions?
The extension should ensure the right versions of both are on your machine but perhaps it’s not sending commands to the right .NET version.
Sure, forgot to include that:
Microsoft Visual Studio Community 2022
Version 17.2.6
VisualStudio.17.Release/17.2.6+32630.192
Microsoft .NET Framework
Version 4.8.04161
Installed Version: Community
Visual C++ 2022 00482-90000-00000-AA621
Microsoft Visual C++ 2022
.NET Core Debugging with WSL 1.0
.NET Core Debugging with WSL
ASP.NET and Web Tools 2019 17.2.393.26812
ASP.NET and Web Tools 2019
Azure App Service Tools v3.0.0 17.2.393.26812
Azure App Service Tools v3.0.0
Azure Functions and Web Jobs Tools 17.2.393.26812
Azure Functions and Web Jobs Tools
C# Tools 4.2.0-4.22281.5+8d3180e5f00d42f0f0295165f756f368f0cbfa44
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
Common Azure Tools 1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.
Cookiecutter 17.0.22089.1
Provides tools for finding, instantiating and customizing templates in cookiecutter format.
Extensibility Message Bus 1.2.6 (master@34d6af2)
Provides common messaging-based MEF services for loosely coupled Visual Studio extension components communication and integration.
Linux Core Dump Debugging 1.0.9.32408
Enables debugging of Linux core dumps.
Microsoft JVM Debugger 1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines
Mono Debugging for Visual Studio 17.2.20 (482eb2a)
Support for debugging Mono processes with Visual Studio.
Node.js Tools 1.5.40404.3 Commit Hash:dd524a7d0ee653de8b7b32a93ca22f2d57cd2419
Adds support for developing and debugging Node.js apps in Visual Studio
NuGet Package Manager 6.2.1
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/
Python - Profiling support 17.0.22089.1
Profiling support for Python projects.
Python with Pylance 17.0.22089.1
Provides IntelliSense, projects, templates, debugging, interactive windows, and other support for Python developers.
Razor (ASP.NET Core) 17.0.0.2218101+885a343b00bcab620a90c1550c37dafd730ce984
Provides languages services for ASP.NET Core Razor.
SQL Server Data Tools 17.0.62204.01010
Microsoft SQL Server Data Tools
Test Adapter for Boost.Test 1.0
Enables Visual Studio's testing tools with unit tests written for Boost.Test. The use terms and Third Party Notices are available in the extension installation directory.
Test Adapter for Google Test 1.0
Enables Visual Studio's testing tools with unit tests written for Google Test. The use terms and Third Party Notices are available in the extension installation directory.
TypeScript Tools 17.0.10418.2001
TypeScript Tools for Microsoft Visual Studio
Visual Basic Tools 4.2.0-4.22281.5+8d3180e5f00d42f0f0295165f756f368f0cbfa44
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.
Visual C++ for Linux Development 1.0.9.32408
Visual C++ for Linux Development
Visual F# Tools 17.1.0-beta.22329.1+702b8e77f5fbfe21e6743324c1750503e02f182d
Microsoft Visual F# Tools
Visual Studio IntelliCode 2.2
AI-assisted development for Visual Studio.
VisualStudio.DeviceLog 1.0
Information about my package
VisualStudio.Mac 1.0
Mac Extension for Visual Studio
VSPackage Extension 1.0
VSPackage Visual Studio Extension Detailed Info
Windows Driver Kit 10.0.22605.1
Headers, libraries, and tools needed to develop, debug, and test Windows drivers (msdn.microsoft.com/en-us/windows/hardware/gg487428.aspx)
Xamarin 17.2.0.177 (d17-2@2f6c881)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.
Xamarin Designer 17.2.0.244 (remotes/origin/d17-2@197e1a0b7)
Visual Studio extension to enable Xamarin Designer tools in Visual Studio.
Xamarin Templates 17.2.15 (2e3b60e)
Templates for building iOS, Android, and Windows apps with Xamarin and Xamarin.Forms.
Xamarin.Android SDK 12.3.3.3 (d17-2/4e061b7)
Xamarin.Android Reference Assemblies and MSBuild support.
Mono: dffa5ab
Java.Interop: xamarin/java.interop/d17-2@9760f0a9
ProGuard: Guardsquare/proguard/v7.0.1@912d149
SQLite: xamarin/sqlite/3.38.2@7b1e016
Xamarin.Android Tools: xamarin/xamarin-android-tools/d17-2@fc3c2ac
Xamarin.iOS and Xamarin.Mac SDK 15.10.0.5 (96b3edb6d)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.
dotnet --info:
.NET SDK (reflecting any global.json):
Version: 6.0.302
Commit: c857713418
Runtime Environment:
OS Name: Windows
OS Version: 10.0.22000
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\6.0.302\
global.json file:
Not found
Host:
Version: 6.0.7
Architecture: x64
Commit: 0ec02c8c96
.NET SDKs installed:
6.0.202 [C:\Program Files\dotnet\sdk]
6.0.203 [C:\Program Files\dotnet\sdk]
6.0.301 [C:\Program Files\dotnet\sdk]
6.0.302 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.27 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.27 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.17 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.4 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.5 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.6 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.7 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Hello! So I found out what is happening but I haven't found out why.
Do you have any more messages in any of the output tabs in VS?
If you'd be up for trying something ... I'd try this:
- Open Developer Command Prompt
- Navigate to the following path (or equivalent for your Visual Studio install)
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\CommonExtensions\Microsoft\Notebook\InteractiveService
- Run
dotnet tool restore

I'm hoping we'll see the above but if we don't ... I'm hoping we'll get more information.
Do you have any more messages in any of the output tabs in VS?
no, just the above message returning in loop. in the Output tab under DetectKernelStatueService
- Open Developer Command Prompt
- Navigate to the following path (or equivalent for your Visual Studio install)
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\CommonExtensions\Microsoft\Notebook\InteractiveService
- Run
dotnet tool restore
This didn't work for me, getting errors:
❯ dotnet tool restore
C:\Users\Oren\AppData\Local\Temp\idgoxfsu.xo5\restore.csproj : error NU1101: Unable to find package microsoft.dotnet-interactive. No packages exist with this id in source(s): Microsoft Visual St
udio Offline Packages
Package "microsoft.dotnet-interactive" failed to restore, due to Microsoft.DotNet.ToolPackage.ToolPackageException: The tool package could not be restored.
at Microsoft.DotNet.Tools.Tool.Install.ProjectRestorer.Restore(FilePath project, PackageLocation packageLocation, String verbosity)
at Microsoft.DotNet.ToolPackage.ToolPackageInstaller.InstallPackageToExternalManagedLocation(PackageLocation packageLocation, PackageId packageId, VersionRange versionRange, String targetFramework, String verbosity)
at Microsoft.DotNet.Tools.Tool.Restore.ToolRestoreCommand.InstallPackages(ToolManifestPackage package, Nullable`1 configFile)
Restore failed.
Checked my nuGet configuration at %appdata%\NuGet\nuget.config
packageSources was empty
I added the following line :
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
And now everything is working after dotnet tool restore.
Awesome I was just about to ask!
These are the two nuget configs that I was going to ask to check:
%appdata%\NuGet\NuGet.Config
%ProgramFiles(x86)%\NuGet\Config
Posting here as reference in the future.
We'll work to add our own nuget.config to the extension to make this more robust. Thanks!!
I wanted to add that my attempt to just include <add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
to the file %appdata%\NuGet\nuget.config
didn't work.
After looking at some of the other files mentioned I was able to resolve the issue by modifying the file as follows.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
</configuration>
Hoping this can help others resolve this issue faster.
Hit the same error, but for me it turned out to be our corporate proxy blocking nuget.org - we typically get packages from an internal mirror. Adding http[s]_proxy environment variables worked as a workaround. Confusingly I'd tried installing dotnet-interactive as both a global and local tool, so I wonder what else you need to reach out to nuget.org for?