![]() |
VOOZH | about |
dotnet add package Microsoft.Windows.AI.MachineLearning --version 2.1.71
NuGet\Install-Package Microsoft.Windows.AI.MachineLearning -Version 2.1.71
<PackageReference Include="Microsoft.Windows.AI.MachineLearning" Version="2.1.71" />
<PackageVersion Include="Microsoft.Windows.AI.MachineLearning" Version="2.1.71" />Directory.Packages.props
<PackageReference Include="Microsoft.Windows.AI.MachineLearning" />Project file
paket add Microsoft.Windows.AI.MachineLearning --version 2.1.71
#r "nuget: Microsoft.Windows.AI.MachineLearning, 2.1.71"
#:package Microsoft.Windows.AI.MachineLearning@2.1.71
#addin nuget:?package=Microsoft.Windows.AI.MachineLearning&version=2.1.71Install as a Cake Addin
#tool nuget:?package=Microsoft.Windows.AI.MachineLearning&version=2.1.71Install as a Cake Tool
The Microsoft.Windows.AI.MachineLearning package provides Windows Machine Learning APIs for
on-device AI inference using ONNX Runtime.
Microsoft.WindowsAppSDK.ML package
instead, which provides framework-based deployment via the Windows App SDK runtime.Add a reference to Microsoft.Windows.AI.MachineLearning in your project. No additional
configuration is required for unpackaged apps on Windows 10 19H1+ and Windows 11.
#include <winrt/Microsoft.Windows.AI.MachineLearning.h>
using Microsoft.Windows.AI.MachineLearning;
Binaries are deployed alongside your application:
MyApp/
├── MyApp.exe
├── Microsoft.Windows.AI.MachineLearning.dll
├── onnxruntime.dll
└── DirectML.dll
WinRT activation relies on OS-native reg-free WinRT, available on Windows 10 19H1+.
The ONNX Runtime headers are included in a winml subdirectory:
#include <winml/onnxruntime_c_api.h>
#include <winml/onnxruntime_cxx_api.h>
To use headers without the winml/ prefix:
<PropertyGroup>
<WinMLEnableDefaultOrtHeaderIncludePath>true</WinMLEnableDefaultOrtHeaderIncludePath>
</PropertyGroup>
For WindowsAppSDK consumers or packaged (MSIX) applications, use
Microsoft.WindowsAppSDK.ML instead. It depends on this package transitively and provides
additional integration with the Windows App SDK runtime.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0-windows10.0.17763 net6.0-windows10.0.17763 is compatible. net7.0-windows net7.0-windows was computed. net8.0-windows net8.0-windows was computed. net8.0-windows10.0.17763 net8.0-windows10.0.17763 is compatible. net9.0-windows net9.0-windows was computed. net10.0-windows net10.0-windows was computed. |
| native | native native is compatible. |
Showing the top 2 NuGet packages that depend on Microsoft.Windows.AI.MachineLearning:
| Package | Downloads |
|---|---|
|
Microsoft.WindowsAppSDK.ML
The Windows App SDK empowers all Windows Desktop apps with modern Windows UI, APIs, and platform features, including back-compat support. This package contains the Windows Machine Learning APIs. |
|
|
Microsoft.AI.Foundry.Local.Core.WinML
Microsoft Foundry Local Core WinML native library - Native AOT compiled Windows AI inference library with WinML support |
Showing the top 3 popular GitHub repositories that depend on Microsoft.Windows.AI.MachineLearning:
| Repository | Stars |
|---|---|
|
yaog6700-bit/Swell-Proxy
Windows原生代理客户端
|
|
|
hpavlo/Rememory
Rememory | Clipboard Manager
|
|
|
PhoenixNil/XrayUI-dev
Lightweight native Windows GUI client for Xray core, built with WinUI 3
|
| Version | Downloads | Last Updated |
|---|---|---|
| 2.1.75-experimental | 375 | 6/8/2026 |
| 2.1.71 | 360 | 6/10/2026 |
| 2.1.70 | 11,421 | 6/8/2026 |
| 2.1.6 | 568 | 5/28/2026 |
| 2.1.3-experimental | 1,044 | 5/18/2026 |
| 2.1.1 | 49,462 | 5/18/2026 |
| 2.0.325-experimental | 1,209 | 4/21/2026 |
| 2.0.300 | 60,256 | 4/28/2026 |
| 2.0.297-preview | 1,939 | 3/26/2026 |