microsoft/semantic-kernel · error · NotSupportedException
Vector store type '{config.Rag.VectorStoreType}' is not supp
Error message
Vector store type '{config.Rag.VectorStoreType}' is not supported. What it means
Error "Vector store type '{config.Rag.VectorStoreType}' is not supported." thrown in microsoft/semantic-kernel.
Source
Thrown at dotnet/samples/Demos/AgentFrameworkWithAspire/ChatWithAgent.ApiService/Program.cs:183
}
// Add Vector Store
switch (config.Rag.VectorStoreType)
{
case AzureAISearchConfig.ConfigSectionName:
{
builder.AddAzureSearchClient(
connectionName: AzureAISearchConfig.ConnectionStringName,
configureSettings: (settings) => settings.Credential = builder.Environment.IsProduction()
? new DefaultAzureCredential()
: new AzureCliCredential()
);
builder.Services.AddAzureAISearchCollection<TextSnippet<string>>(config.Rag.CollectionName);
builder.Services.AddVectorStoreTextSearch<TextSnippet<string>>();
break;
}
default:
throw new NotSupportedException($"Vector store type '{config.Rag.VectorStoreType}' is not supported.");
}
}
/// <summary>
/// Adds the chat completion agent to the service collection.
/// </summary>
/// <param name="builder">The web application builder.</param>
/// <param name="config">The host configuration.</param>
private static void AddAgent(WebApplicationBuilder builder, HostConfig config)
{
// Register agent without RAG if no collection name is provided. Allows for a basic experience where no data has been uploaded to the vector store yet.
if (string.IsNullOrEmpty(config.Rag.CollectionName))
{
PromptTemplateConfig templateConfig = KernelFunctionYaml.ToPromptTemplateConfig(EmbeddedResource.Read("AgentDefinition.yaml"));
builder.Services.AddTransient<ChatCompletionAgent>((sp) =>
{
return new ChatCompletionAgent(templateConfig, new HandlebarsPromptTemplateFactory())View on GitHub (pinned to c028a0c7dc)
Solutions
- Set Rag:VectorStoreType to one of the supported vector store values in configuration.
- Check Program.cs for the list of supported vector store types and correct the configuration value.
When it happens
Trigger: Thrown at dotnet/samples/Demos/AgentFrameworkWithAspire/ChatWithAgent.ApiService/Program.cs:183 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of microsoft/semantic-kernel@c028a0c7dc (2026-08-13).
Data as JSON: /api/errors/6de100e8e1fc8d3a.
Report an issue: GitHub.