Skip to content

'IServiceCollection' does not contain a definition for 'AddOllamaClientApi'Β #804

@davidfowl

Description

@davidfowl

Discussed in #803

Originally posted by aalmada August 23, 2025
Sorry but I'm already feeling stupid with this one. I already tried so many things...

I added Ollama hosting to my App Host. No issues there. Downloads the model successfuly.

I now want to use the OllamaSharp in my ApiService. I followed the documentation:

  • Added package reference to CommunityToolkit.Aspire.OllamaSharp
  • Added the builder.Services.AddOllamaClientApi("ollama") to Program.cs.

I keep getting the compilation error: 'IServiceCollection' does not contain a definition for 'AddOllamaClientApi'.

I'm using:

  • .NET 10 Preview 7
  • Aspire 9.4.1

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions