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
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.
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)
RogerBarreto
changed the title
Bug: Can't instantiate OllamaTextEmbeddingGenerationService (.Net Framework 4.7.2)
Bug: OllamaSharp is not StrongName signed and won't work for (.Net Framework target SDKs)
Sep 30, 2024
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.
Steps to reproduce the behavior:
Platform
The text was updated successfully, but these errors were encountered: