From e7d2e2297bc422570ccae48bbe0680bf66f85ca0 Mon Sep 17 00:00:00 2001 From: "Gordon Lam (SH)" Date: Mon, 13 Apr 2026 16:02:46 +0800 Subject: [PATCH] Add missing C++/WinRT includes to C++ get-started snippet EnsureAndRegisterCertifiedAsync().get() requires Windows.Foundation.h and Windows.Foundation.Collections.h for the projected return types. Fixes ADO #61791708 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- docs/new-windows-ml/get-started.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/new-windows-ml/get-started.md b/docs/new-windows-ml/get-started.md index d722e251..2e298afc 100644 --- a/docs/new-windows-ml/get-started.md +++ b/docs/new-windows-ml/get-started.md @@ -157,6 +157,8 @@ The simplest way to get started is to let Windows ML automatically discover, dow ```cppwinrt #include +#include +#include #include // First we need to create an ORT environment @@ -167,7 +169,7 @@ winrt::Microsoft::Windows::AI::MachineLearning::ExecutionProviderCatalog catalog winrt::Microsoft::Windows::AI::MachineLearning::ExecutionProviderCatalog::GetDefault(); // Ensure and register all compatible execution providers with ONNX Runtime -catalog.EnsureAndRegisterCertifiedAsync().get(); +co_await catalog.EnsureAndRegisterCertifiedAsync(); ``` ### [C/C++](#tab/c)