External Kernel Extensions with Formatters cannot load anymore `System.MissingMethodException`
See original GitHub issueDescribe the bug
Since the newest update, kernel extension containing a call to Formatter.Register
will fail with the following stack trace
Loading kernel extension "ClockKernelExtension" from assembly /home/gregor/.nuget/packages/clockextension/1.3.5/interactive-extensions/dotnet/ClockExtension.dll
Error: Microsoft.DotNet.Interactive.KernelExtensionLoadException: Failure loading Kernel Extension
---> System.MissingMethodException: Method not found: 'Void Microsoft.DotNet.Interactive.Formatting.Formatter.Register(System.Action`2<!!0,System.IO.TextWriter>, System.String, Boolean)'.
at ClockExtension.ClockKernelExtension.OnLoadAsync(Kernel kernel)
at Microsoft.DotNet.Interactive.Extensions.AssemblyBasedExtensionLoader.LoadFromAssembly(FileInfo assemblyFile, Kernel kernel, KernelInvocationContext context) in F:\workspace\_work\1\s\src\Microsoft.DotNet.Interactive\Extensions\AssemblyBasedExtensionLoader.cs:line 130
--- End of inner exception stack trace ---
I tested the most common overloads using the different Func
and Action
delegates as well as the one taking an ITypeFormatter
. The behavior is reproducible with extensions written in F# (currently all my extensions are failing unfortunately) as well as the ones in C# (I tested the ClockExtension
in this repo to see if it only hits F# projects - it appears to impact everything).
I tried to snoop around in the source code but I fear, that I don’t understand it well enough to find the problem. If I can add any more info I’m always happy to help.
Please complete the following:
VSCode Plugin Version: v1.0.157302 (Git SHA 6dfc99911743a633b5edbac09a8c5fe5e5e9f980)
- OS
- [ x] Windows 10 (remote on WSL2 Ubuntu 20.04)
- macOS
- Linux (Please specify distro)
- iOS
- Android
- Browser
- Chrome
- Edge
- Firefox
- Safari
- Not applicable
- Frontend
- Jupyter Notebook
- Jupyter Lab
- nteract
- Visual Studio Code
- Other (please specify)
Screenshots
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top GitHub Comments
@WalternativE you are most welcome
I tested my extension packages with your suggested changes. It works perfectly 🎉🎉🎉🎉 Thank you very much for your help and for your patience with my issue. Really loving to see dotnet interactive being updated to .NET 5 that quickly.