Using polyglot notebooks in Visual Studio Code how can you autoimport missing namespaces for .NET C#

87 views Asked by At

Using polyglot notebooks in VS Code with .NET8, I cannot seem to figure out how to trigger the autoimport functionality, "Quick action", normaly used with dotnet development.

I have checked that the setting is turned on and working in a normal Console application setup: From VS Code settings.

(SettingsID in JSON format is dotnet.completion.showCompletionItemsFromUnimportedNamespaces.)

F.ex. in a .dib notbook:

using (FileStream fs = new FileStream("/AnExample/FilePath", FileMode.Create))
{
  ...
}

This will not give me a "Quick action" to import the missing namespace, System.IO.

But when I am in a normal .NET Console application setup, I will get this "Quick action" automatically as shown below: From VS Code "Quick action" import missing namespcae

0

There are 0 answers