-
Notifications
You must be signed in to change notification settings - Fork 406
Closed
Labels
Area-Packages and ExtensionsRelated to acquiring and using packages and extensionsRelated to acquiring and using packages and extensionsbugSomething isn't workingSomething isn't working
Description
I have F# kernel extension in which (among other requirements) I want to reference nuget packages (to avoid doing it in the editor and disturbing users from proper value) AND open namespaces.
My OnLoadAsync method contains following code piece :
let code =
[
"#r nuget:Feliz"
"open Feliz"
] |> String.concat Environment.NewLine
kernel.VisitSubkernelsAndSelf(
function
| :? FSharpKernel as fs ->
fs.SendAsync(SubmitCode (code,"fsharp"))
|> Async.AwaitTask
|> Async.RunSynchronously
| _ -> ()
)
Package loads successfully but it fails upon opening namespaces/modules:
Error: input.fsx (2,6)-(2,11) typecheck error The namespace or module 'Feliz' is not defined.
Exactly the same code inserted into cell works fine:
r# nuget:Feliz
open Feliz
Is this kernel extension limitation/ by design ? I suspect rather that it is more kernel context operation involved that I may use in a wrong way
Metadata
Metadata
Assignees
Labels
Area-Packages and ExtensionsRelated to acquiring and using packages and extensionsRelated to acquiring and using packages and extensionsbugSomething isn't workingSomething isn't working