You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
.Net - After update RC.1 , can not run in WithAzureOpenAIChatCompletion #3962
`
Kernel kernel = new KernelBuilder()
.WithAzureOpenAIChatCompletion("dp","modelid","endpoint","key")
.Build();
'
To Reproduce
Steps to reproduce the behavior:
run it in polyglot
See error
Error: System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Bcl.AsyncInterfaces, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'. The system cannot find the file specified.
File name: 'Microsoft.Bcl.AsyncInterfaces, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'
at Submission#5.<>d__0.MoveNext()
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.Start[TStateMachine](TStateMachine& stateMachine)
at Submission#5.()
at Submission#5.(Object[] submissionArray)
at Microsoft.CodeAnalysis.Scripting.ScriptExecutionState.RunSubmissionsAsync[TResult](ImmutableArray1 precedingExecutors, Func2 currentExecutor, StrongBox1 exceptionHolderOpt, Func2 catchExceptionOpt, CancellationToken cancellationToken)
changed the title [-].NET - After update RC.1 , can not run in WithAzureOpenAIChatCompletion[/-][+].Net - After update RC.1 , can not run in WithAzureOpenAIChatCompletion[/+]on Dec 5, 2023
Steps to reproduce the behavior:
run it in polyglot
Can you provide a more detailed repro? What's the complete code you're using? (The repro doesn't include referencing the relevant packages, for example)
My guess is that however polyglot notebooks is loading things, it's ending up loading something that has a dependency on an older version of Microsoft.Bcl.AsyncInterfaces, then trying to load this code into the same AssemblyLoadContext/AppDomain, failing to then load the new version of the same M.B.AsyncInterfaces assembly into the same context/domain, and then it's failing because of the dependency on the new version.
Stephen Toub (@stephentoub) I received the same problem while updating dotnet notebooks, I think it's because C# Polyglot Notebooks don't support .NET 8 yet:
Activity
[-].NET - After update RC.1 , can not run in WithAzureOpenAIChatCompletion[/-][+].Net - After update RC.1 , can not run in WithAzureOpenAIChatCompletion[/+]stephentoub commentedon Dec 5, 2023
Can you provide a more detailed repro? What's the complete code you're using? (The repro doesn't include referencing the relevant packages, for example)
Diego Colombo (@colombod), can you help with this?
My guess is that however polyglot notebooks is loading things, it's ending up loading something that has a dependency on an older version of Microsoft.Bcl.AsyncInterfaces, then trying to load this code into the same AssemblyLoadContext/AppDomain, failing to then load the new version of the same M.B.AsyncInterfaces assembly into the same context/domain, and then it's failing because of the dependency on the new version.
dmytrostruk commentedon Dec 5, 2023
Stephen Toub (@stephentoub) I received the same problem while updating dotnet notebooks, I think it's because C# Polyglot Notebooks don't support .NET 8 yet:

I found related work regarding .NET 8 support, these PRs were already merged 2 weeks ago but it looks like they are not released yet:
dotnet/interactive#3336
dotnet/vscode-dotnet-pack#515
colombod commentedon Dec 5, 2023
we are releasing .NET8 support this week. it is currently available if you switch the extension in pre-release
dmytrostruk commentedon Dec 5, 2023
Diego Colombo (@colombod) I tried to switch extension to pre-release:

But I still receive the same issue:

Is there anything I'm missing for workaround?
WeihanLi commentedon Dec 6, 2023
There's a new release from dotnet-interactive now
https://github.com/dotnet/interactive/releases/tag/v1.0.4605020
.Net: Update notebooks to use RC version of Semantic Kernel (#4077)
.Net: Update notebooks to use RC version of Semantic Kernel (microsof…
.Net: Update notebooks to use RC version of Semantic Kernel (microsof…