.NET Community Toolkit is a collection of helpers and APIs that work for all .NET developers and are agnostic of any specific UI platform. The toolkit is maintained and published by Microsoft, and part of the .NET Foundation.
Originally posted by **Touseefelahi** November 23, 2023
How to use keyed services in my Avalonia Application?
I am trying to use the keyed services feature from .net 8, but it is not working for me.
This is what I have in my App.axaml.cs file
```
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using CommunityToolkit.Mvvm.DependencyInjection;
var services = new ServiceCollection();
services.AddKeyedTransient(ServiceList.LocalDB);
Ioc.Default.ConfigureServices(ConfigureServices());
```
This is how I am trying to get the keyed service in some other class
```
Ioc.Default.GetRequiredKeyedService("LocalDB");
```
This is the error that I am getting:
`This service provider doesn't support keyed services.
`
Am I missing something here? or the feature is not implemented yet?
Thank you
Discussed in https://github.com/CommunityToolkit/dotnet/discussions/800