-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Closed
Labels
.NETIssue or Pull requests regarding .NET codeIssue or Pull requests regarding .NET codeblockedThis issue is blocked from making progressThis issue is blocked from making progressbugSomething isn't workingSomething isn't working
Description
Since the "OllamaSharp" dependency does not have a strong name, "Microsoft.SemanticKernel.Connectors.Ollama" won't load it when targetting .Net Framework SDKs.
Those strong name issues do not apply to .net core though.
Related issue:
The following error occurs when trying to instantiate "OllamaTextEmbeddingGenerationService" in a .net 4.7.2 project.
Unhandled Exception: System.IO.FileLoadException: Could not load file or assembly 'OllamaSharp, Version=3.0.1.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. A strongly-named assembly is required. (Exception from HRESULT: 0x80131044)
at Microsoft.SemanticKernel.Connectors.Ollama.Core.ServiceBase..ctor(String model, Uri endpoint, HttpClient httpClient, ILoggerFactory loggerFactory)
at Microsoft.SemanticKernel.Connectors.Ollama.OllamaTextEmbeddingGenerationService..ctor(String modelId, Uri endpoint, ILoggerFactory loggerFactory)
at OllamaStrongNameIssue.Program.Main(String[] args)
Steps to reproduce the behavior:
- Create a .net 4.7.2 console project
- Add the "Microsoft.SemanticKernel.Connectors.Ollama" nuget package (currently v1.20.0-alpha)
- Add the following code in the main function :
var service = new OllamaTextEmbeddingGenerationService("fake-model", new Uri("http://localhost:11434/", UriKind.Absolute));
- Run the program
Platform
- OS: Windows 11 Pro
- IDE: Visual Studio 2022 v17.11.4
- Language: C#
Metadata
Metadata
Assignees
Labels
.NETIssue or Pull requests regarding .NET codeIssue or Pull requests regarding .NET codeblockedThis issue is blocked from making progressThis issue is blocked from making progressbugSomething isn't workingSomething isn't working
Type
Projects
Status
Sprint: Done