Skip to content

[Doc] Add missing C++/WinRT includes to C++ get-started snippet#265

Open
yeelam-gordon wants to merge 1 commit into
MicrosoftDocs:docsfrom
yeelam-gordon:fix/61791708-cpp-getstarted-missing-includes
Open

[Doc] Add missing C++/WinRT includes to C++ get-started snippet#265
yeelam-gordon wants to merge 1 commit into
MicrosoftDocs:docsfrom
yeelam-gordon:fix/61791708-cpp-getstarted-missing-includes

Conversation

@yeelam-gordon
Copy link
Copy Markdown

@yeelam-gordon yeelam-gordon commented Apr 14, 2026

Problem

The C++/WinRT tab uses winrt:: async APIs but is missing Windows.Foundation.h and Windows.Foundation.Collections.h includes, causing compilation errors. Also uses blocking .get() instead of co_await.

Fix

  • Added #include <winrt/Windows.Foundation.h> and Windows.Foundation.Collections.h
  • Changed .get() to co_await

Files changed

  • docs/new-windows-ml/get-started.md — C++/WinRT tab

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>
@nieubank
Copy link
Copy Markdown
Contributor

Thanks for the fix proposal. During triage for ADO 61791708, we found the private windows-ai-docs-pr target no longer has the C++ get-started snippet that this PR modifies; the private get-started.md is now a short overview/path page without that code block.

Recommendation: do not port this PR to windows-ai-docs-pr; close or handle independently for the public docs repo if that older snippet remains in scope there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants