<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Dapr Vector .NET SDK on Dapr Docs</title><link>https://docs.dapr.io/developing-applications/sdks/dotnet/dotnet-vector/</link><description>Recent content in Dapr Vector .NET SDK on Dapr Docs</description><generator>Hugo</generator><language>en</language><atom:link href="https://docs.dapr.io/developing-applications/sdks/dotnet/dotnet-vector/index.xml" rel="self" type="application/rss+xml"/><item><title>How to: Store and query vectors with the Dapr .NET SDK</title><link>https://docs.dapr.io/developing-applications/sdks/dotnet/dotnet-vector/dotnet-vector-howto/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.dapr.io/developing-applications/sdks/dotnet/dotnet-vector/dotnet-vector-howto/</guid><description>&lt;p>Use &lt;code>DaprVectorClient&lt;/code> to store precomputed embeddings and retrieve similar records through a Dapr vector component. This guide uses three-dimensional vectors for readability; real embeddings must match your model&amp;rsquo;s dimensions.&lt;/p>
&lt;h2 id="prerequisites">Prerequisites&lt;/h2>
&lt;ul>
&lt;li>&lt;a href="https://docs.dapr.io/getting-started/install-dapr-cli/">Dapr CLI&lt;/a> and an &lt;a href="https://docs.dapr.io/getting-started/install-dapr-selfhost/">initialized Dapr environment&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://dotnet.microsoft.com/download/dotnet/8.0">.NET 8&lt;/a>, &lt;a href="https://dotnet.microsoft.com/download/dotnet/9.0">.NET 9&lt;/a>, &lt;a href="https://dotnet.microsoft.com/download/dotnet/10.0">.NET 10&lt;/a>, or &lt;a href="https://dotnet.microsoft.com/download/dotnet/11.0">.NET 11&lt;/a>&lt;/li>
&lt;li>Dapr runtime 1.19 or later with Vector support&lt;/li>
&lt;li>The &lt;a href="https://www.nuget.org/packages/Dapr.Vector">Dapr.Vector&lt;/a> NuGet package, version 1.19.0 or later&lt;/li>
&lt;/ul>


&lt;div class="alert alert-warning" role="alert">
&lt;h4 class="alert-heading">.NET framework support&lt;/h4>

 Be advised that .NET 8 and .NET 9 reach end of support in November 2026. Support for both will be dropped
in Dapr v1.20; only .NET 10 and .NET 11 will be supported through the end of 2027.

&lt;/div>

&lt;p>Install the package in an ASP.NET Core project:&lt;/p></description></item><item><title>Dapr Vector client</title><link>https://docs.dapr.io/developing-applications/sdks/dotnet/dotnet-vector/dotnet-vector-client-usage/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://docs.dapr.io/developing-applications/sdks/dotnet/dotnet-vector/dotnet-vector-client-usage/</guid><description>&lt;p>&lt;code>DaprVectorClient&lt;/code> in &lt;code>Dapr.Vector&lt;/code> implements the alpha Vector API through gRPC. Use .NET SDK 1.19.0 or later with a Dapr runtime and component that support Vector. See the &lt;a href="https://docs.dapr.io/developing-applications/sdks/dotnet/dotnet-vector/">overview&lt;/a> for release requirements and the &lt;a href="https://docs.dapr.io/developing-applications/sdks/dotnet/dotnet-vector/dotnet-vector-howto/">how-to&lt;/a> for a complete collection lifecycle.&lt;/p>
&lt;h2 id="client-lifetime-and-configuration">Client lifetime and configuration&lt;/h2>
&lt;p>Reuse a long-lived client. Dependency injection registers a singleton by default and disposes it when the container is disposed:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-csharp" data-lang="csharp">&lt;span class="line">&lt;span class="cl">&lt;span class="k">using&lt;/span> &lt;span class="nn">Dapr.Vector.Extensions&lt;/span>&lt;span class="p">;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="n">builder&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="n">Services&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="n">AddDaprVectorClient&lt;/span>&lt;span class="p">((&lt;/span>&lt;span class="n">serviceProvider&lt;/span>&lt;span class="p">,&lt;/span> &lt;span class="n">clientBuilder&lt;/span>&lt;span class="p">)&lt;/span> &lt;span class="p">=&amp;gt;&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="p">{&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl"> &lt;span class="n">clientBuilder&lt;/span>&lt;span class="p">.&lt;/span>&lt;span class="n">UseGrpcEndpoint&lt;/span>&lt;span class="p">(&lt;/span>&lt;span class="s">&amp;#34;http://localhost:50001&amp;#34;&lt;/span>&lt;span class="p">);&lt;/span>
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="cl">&lt;span class="p">});&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The callback can resolve configuration or other services through &lt;code>serviceProvider&lt;/code>. The optional &lt;code>lifetime&lt;/code> argument supports other &lt;code>ServiceLifetime&lt;/code> values.&lt;/p></description></item></channel></rss>