Skip to content

.Net: Bug: IVectorStore Type Load exception #12669

Closed
@pravinchandankhede

Description

@pravinchandankhede

I am using the preview version of the package Microsoft.SemanticKernel.Connectors.AzureAISearch (1.41.0-preview). I recently upgraded my Microsoft.SemanticKernel to 1.59.0.

However, post this upgrade I am getting the below error -

An exception of type 'System.TypeLoadException' occurred in System.Private.CoreLib.dll but was not handled in user code
Could not load type 'Microsoft.Extensions.VectorData.IVectorStore' from assembly 'Microsoft.Extensions.VectorData.Abstractions, Version=9.0.0.0, Culture=neutral, PublicKeyToken=f300afd708cefcd3'.

Earlier I had an helper class EnbeddingEngine which looks liked below

internal class EmbeddingEngine(IVectorStore vectorStore, ITextEmbeddingGenerationService textEmbeddingGenerationService)

Post upgrading Microsoft.SemanticKernel.Abstractions to 1.59.0, I changed the code like below

internal class EmbeddingEngine(VectorStore vectorStore, IEmbeddingGenerator<String, Embedding> embeddingGenerator)

Even though the code compiled, during runtime I got the above type load exception.

  • Language: C#
  • Visual Studio

Git Repo Project Path - https://github.com/pravinchandankhede/agenticai/tree/main/src/Banking-Multi-Agent-System-Demo/Agents/InvoiceAgent

Metadata

Metadata

Assignees

No one assigned

    Labels

    .NETIssue or Pull requests regarding .NET codebugSomething isn't workingtriage

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions