Skip to content

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

Closed

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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