plbonneville / razorinteractive Goto Github PK
View Code? Open in Web Editor NEW.NET Interactive Notebooks Razor Extension
Home Page: https://plbonneville.com/blog/introducing-the-dotnet-interactive-notebooks-razor-extension/
License: MIT License
.NET Interactive Notebooks Razor Extension
Home Page: https://plbonneville.com/blog/introducing-the-dotnet-interactive-notebooks-razor-extension/
License: MIT License
Installed Packages: RazorInteractive, 1.0.6
Error: System.ArgumentException: An element with the same key 'test' already exists in the ExpandoObject. (Parameter 'key')
at System.Dynamic.ExpandoObject.TrySetValue(Object indexClass, Int32 index, Object value, String name, Boolean ignoreCase, Boolean add)
at System.Dynamic.ExpandoObject.TryAddMember(String key, Object value)
at System.Dynamic.ExpandoObject.System.Collections.Generic.IDictionary<System.String,System.Object>.Add(String key, Object value)
at RazorInteractive.ModelCreator.<>c.b__1_0(IDictionary2 dictionary, ScriptVariable variable) at System.Linq.ImmutableArrayExtensions.Aggregate[TAccumulate,T](ImmutableArray
1 immutableArray, TAccumulate seed, Func3 func) at RazorInteractive.ModelCreator.CreateModelFromCurrentVariables(CSharpKernel csharpKernel) at RazorInteractive.ModelCreator.CreateModelFromCurrentVariables(Kernel kernel) at RazorInteractive.ModelCreator.CreateModelFromCurrentVariables(Kernel kernel) at RazorInteractive.RazorExtensions.<>c__DisplayClass1_0
1.b__0(RazorMarkdown markdown, TextWriter writer)
at Microsoft.DotNet.Interactive.Formatting.Formatter.<>c__DisplayClass49_01.<Register>b__0(Object value, FormatContext context) in D:\a\_work\1\s\src\Microsoft.DotNet.Interactive.Formatting\Formatter.cs:line 467 at Microsoft.DotNet.Interactive.Formatting.Formatter
1.FormatTo(T obj, FormatContext context, String mimeType) in D:\a_work\1\s\src\Microsoft.DotNet.Interactive.Formatting\Formatter{T}.cs:line 65
at Microsoft.DotNet.Interactive.Formatting.Formatter.ToDisplayString(Object obj, String mimeType) in D:\a_work\1\s\src\Microsoft.DotNet.Interactive.Formatting\Formatter.cs:line 264
at Microsoft.DotNet.Interactive.FormattedValue.<>c__DisplayClass7_0.b__1(String mimeType) in D:\a_work\1\s\src\Microsoft.DotNet.Interactive\FormattedValue.cs:line 37
at System.Linq.Enumerable.SelectArrayIterator2.ToArray() at Microsoft.DotNet.Interactive.FormattedValue.FromObject(Object value, String[] mimeTypes) in D:\a\_work\1\s\src\Microsoft.DotNet.Interactive\FormattedValue.cs:line 37 at Microsoft.DotNet.Interactive.KernelInvocationContextExtensions.Display(KernelInvocationContext context, Object value, String[] mimeTypes) in D:\a\_work\1\s\src\Microsoft.DotNet.Interactive\KernelInvocationContextExtensions.cs:line 22 at RazorInteractive.RazorKernel.HandleAsync(SubmitCode command, KernelInvocationContext context) at Microsoft.DotNet.Interactive.Kernel.<>c__DisplayClass72_0
1.b__0(KernelCommand _, KernelInvocationContext context) in D:\a_work\1\s\src\Microsoft.DotNet.Interactive\Kernel.cs:line 690
at Microsoft.DotNet.Interactive.Kernel.HandleAsync(KernelCommand command, KernelInvocationContext context) in D:\a_work\1\s\src\Microsoft.DotNet.Interactive\Kernel.cs:line 257
at Microsoft.DotNet.Interactive.KernelCommandPipeline.b__6_0(KernelCommand command, KernelInvocationContext context, KernelPipelineContinuation _) in D:\a_work\1\s\src\Microsoft.DotNet.Interactive\KernelCommandPipeline.cs:line 57
at Microsoft.DotNet.Interactive.KernelCommandPipeline.<>c__DisplayClass6_1.<b__3>d.MoveNext() in D:\a_work\1\s\src\Microsoft.DotNet.Interactive\KernelCommandPipeline.cs:line 73
--- End of stack trace from previous location ---
at Microsoft.DotNet.Interactive.CompositeKernel.LoadExtensions(KernelCommand command, KernelInvocationContext context, KernelPipelineContinuation next) in D:\a_work\1\s\src\Microsoft.DotNet.Interactive\CompositeKernel.cs:line 144
at Microsoft.DotNet.Interactive.KernelCommandPipeline.<>c__DisplayClass6_0.<g__Combine|2>d.MoveNext() in D:\a_work\1\s\src\Microsoft.DotNet.Interactive\KernelCommandPipeline.cs:line 74
--- End of stack trace from previous location ---
at Microsoft.DotNet.Interactive.KernelCommandPipeline.SendAsync(KernelCommand command, KernelInvocationContext context) in D:\a_work\1\s\src\Microsoft.DotNet.Interactive\KernelCommandPipeline.cs:line 48
I'm trying to use RazorInteractive with Blazor, and I'm having trouble. Starting a cell with
@using Blazor.Diagrams.Components
I'm getting
The type or namespace name 'Blazor' could not be found (are you missing a using directive or an assembly reference?)
My C# cells work fine, though, so I speculate that this is because Razor has some internal C# engine under the hood that hasn't loaded the right assemblies. I have no idea if this is actually true, however, and definitely don't know how I might get that internal engine to load Blazor. Any suggestions?
There should be a list of default imports for namespaces such as:
@using System
@using System.Collections.Generic
@using System.Linq
@using System.Threading.Tasks
What could cause this?
Failed to load kernel extension "RazorKernelExtension" from assembly user\.nuget\packages\razorinteractive\1.0.7\interactive-extensions\dotnet\RazorInteractive.dll
Error: System.NullReferenceException: Object reference not set to an instance of an object.
at RazorInteractive.ModelCreator.<>c__DisplayClass1_0.<CreateModelFromCurrentVariables>b__0(String name)
at System.Linq.Enumerable.SelectArrayIterator`2.MoveNext()
at System.Linq.Enumerable.Aggregate[TSource,TAccumulate](IEnumerable`1 source, TAccumulate seed, Func`3 func)
at RazorInteractive.ModelCreator.CreateModelFromCurrentVariables(DotNetKernel dotNetKernel)
at RazorInteractive.ModelCreator.CreateModelFromCurrentVariables(Kernel kernel)
at RazorInteractive.ModelCreator.CreateModelFromCurrentVariables(Kernel kernel)
at RazorInteractive.RazorExtensions.<>c__DisplayClass1_0`1.<UseRazor>b__0(RazorMarkdown markdown, TextWriter writer)
Invoking the #r "nuget:RazorInteractive"
fails consistently:
Error: Microsoft.DotNet.Interactive.KernelExtensionLoadException: Failure loading Kernel Extension
---> System.MissingMethodException: Method not found: 'Void Microsoft.DotNet.Interactive.CompositeKernel.Add(Microsoft.DotNet.Interactive.Kernel, System.Collections.Generic.IReadOnlyCollection`1<System.String>)'.
at RazorInteractive.RazorKernelExtension.OnLoadAsync(Kernel kernel)
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at RazorInteractive.RazorKernelExtension.OnLoadAsync(Kernel kernel)
at Microsoft.DotNet.Interactive.Extensions.AssemblyBasedExtensionLoader.LoadFromAssembly(FileInfo assemblyFile, Kernel kernel, KernelInvocationContext context) in D:\a\_work\1\s\src\Microsoft.DotNet.Interactive\Extensions\AssemblyBasedExtensionLoader.cs:line 132
.NET Interactive Notebooks vscode-extension is v1.0.3452020
(latest presently)
dotnet 6 SDK
❯ winget list dotnet.sdk.6
Name Id Version Source
-----------------------------------------------------------------------
Microsoft .NET SDK 6.0.401 (x64) Microsoft.DotNet.SDK.6 6.0.401 winget
Dependabot couldn't find a .(cs|vb|fs)proj for this project.
Dependabot requires a .(cs|vb|fs)proj to evaluate your project's current .NET dependencies. It had expected to find one at the path: /<anything>.(cs|vb|fs)proj
.
If this isn't a .NET project, or if it is a library, you may wish to disable updates for it from within Dependabot.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.