Skip to content

Update WSLC SDK API documentation - #41677

Open
Flor Chacón (florelis) wants to merge 4 commits into
microsoft:masterfrom
florelis:copilot/wslc-sdk-api-docs-text
Open

Flor Chacón (florelis) wants to merge 4 commits into
microsoft:masterfrom
florelis:copilot/wslc-sdk-api-docs-text

Conversation

@florelis

Copy link
Copy Markdown
Member

Summary of the Pull Request

Updates the docs for the WSLC SDK API to the latest API surface. Includes updates for the C, C++ and C# docs.
Generated by Copilot.

PR Checklist

  • Closes: Link to issue #xxx
  • Communication: I've discussed this with core contributors already. If work hasn't been agreed, this work might be rejected
  • Tests: Added/updated if needed and all pass
  • Localization: All end user facing strings can be localized
  • Dev docs: Added/updated if needed
  • Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx

Detailed Description of the Pull Request / Additional comments

Validation Steps Performed

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings September 22, 2026 21:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

Three documentation correctness and compilability issues remain unresolved.

Review effort: Lite
Findings: None

What changed in this PR

This documentation-only PR updates the WSLC SDK API reference for C, C++, and C#.

Changes:

  • Adds installation, authentication, container, callback, enum, and data-class documentation.
  • Updates examples and navigation.
  • Removes obsolete reference material.
File Summary
doc/​docs/​api-reference/​index.md Formatting cleanup
doc/​docs/​api-reference/​csharp/​settings-classes/​installoptions.md Adds C# install options
doc/​docs/​api-reference/​csharp/​settings-classes/​index.md Updates settings navigation
doc/​docs/​api-reference/​csharp/​settings-classes/​.pages Updates settings navigation
doc/​docs/​api-reference/​csharp/​service-class/​wslcservice.md Documents installation options
doc/​docs/​api-reference/​csharp/​enumerations/​index.md Adds token type navigation
doc/​docs/​api-reference/​csharp/​enumerations/​identitytokentype.md Adds token type reference
doc/​docs/​api-reference/​csharp/​enumerations/​error.md Adds ContainerDeleted
doc/​docs/​api-reference/​csharp/​enumerations/​component.md Documents SDK update handling
doc/​docs/​api-reference/​csharp/​enumerations/​.pages Updates enum navigation
doc/​docs/​api-reference/​csharp/​end-to-end-example.md Handles SDK update prerequisite
doc/​docs/​api-reference/​csharp/​data-classes/​index.md Adds authentication result
doc/​docs/​api-reference/​csharp/​data-classes/​authenticateresult.md Adds authentication result reference
doc/​docs/​api-reference/​csharp/​data-classes/​.pages Updates data-class navigation
doc/​docs/​api-reference/​csharp/​core-classes/​session.md Documents container opening and authentication
doc/​docs/​api-reference/​cpp/​settings-classes/​tagimageoptions.md Adds tag options reference
doc/​docs/​api-reference/​cpp/​settings-classes/​pushimageoptions.md Adds push options reference
doc/​docs/​api-reference/​cpp/​settings-classes/​pullimageoptions.md Adds pull options reference
doc/​docs/​api-reference/​cpp/​settings-classes/​installoptions.md Adds install options reference
doc/​docs/​api-reference/​cpp/​settings-classes/​index.md Updates settings navigation
doc/​docs/​api-reference/​cpp/​settings-classes/​.pages Updates settings navigation
doc/​docs/​api-reference/​cpp/​service-class/​wslcservice.md Documents installation options
doc/​docs/​api-reference/​cpp/​not-yet-implemented-and-known-gaps.md Removes obsolete gap
doc/​docs/​api-reference/​cpp/​enumerations/​index.md Adds token type navigation
doc/​docs/​api-reference/​cpp/​enumerations/​identitytokentype.md Adds token type reference
doc/​docs/​api-reference/​cpp/​enumerations/​error.md Adds ContainerDeleted
doc/​docs/​api-reference/​cpp/​enumerations/​component.md Documents SDK update handling
doc/​docs/​api-reference/​cpp/​enumerations/​.pages Updates enum navigation
doc/​docs/​api-reference/​cpp/​end-to-end-example.md Updates prerequisites and image pull
doc/​docs/​api-reference/​cpp/​data-classes/​vhdowner.md Adds VHD owner reference
doc/​docs/​api-reference/​cpp/​data-classes/​serviceversion.md Adds service version reference
doc/​docs/​api-reference/​cpp/​data-classes/​referenced.md Removes obsolete placeholder
doc/​docs/​api-reference/​cpp/​data-classes/​processcrashinformation.md Adds crash information reference
doc/​docs/​api-reference/​cpp/​data-classes/​installprogress.md Updates installation progress example
doc/​docs/​api-reference/​cpp/​data-classes/​index.md Adds new data classes
doc/​docs/​api-reference/​cpp/​data-classes/​authenticateresult.md Adds authentication result reference
doc/​docs/​api-reference/​cpp/​data-classes/​.pages Updates data-class navigation
doc/​docs/​api-reference/​cpp/​core-classes/​session.md Documents container opening and authentication
doc/​docs/​api-reference/​c/​structures/​wslcprocesscallbacks.md Adds callback descriptions and links
doc/​docs/​api-reference/​c/​session-apis/​wslcsessionauthenticate.md Documents token type output
doc/​docs/​api-reference/​c/​install-and-version-apis/​wslcinstallwithdependencies.md Documents install options
doc/​docs/​api-reference/​c/​enumerations/​wslcinstalloptions.md Adds install options reference
doc/​docs/​api-reference/​c/​enumerations/​wslcidentitytokentype.md Adds token type reference
doc/​docs/​api-reference/​c/​enumerations/​wslccomponentflags.md Documents SDK update handling
doc/​docs/​api-reference/​c/​enumerations/​index.md Adds enum references
doc/​docs/​api-reference/​c/​enumerations/​.pages Updates enum navigation
doc/​docs/​api-reference/​c/​end-to-end-example.md Handles SDK update prerequisite
doc/​docs/​api-reference/​c/​container-apis/​wslcsetcontainerinitprocessiocallbacks.md Adds callback API reference
doc/​docs/​api-reference/​c/​container-apis/​wslcopencontainer.md Adds container-opening API reference
doc/​docs/​api-reference/​c/​container-apis/​index.md Updates container API navigation
doc/​docs/​api-reference/​c/​container-apis/​.pages Updates container API navigation

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread doc/docs/api-reference/c/enumerations/index.md
Comment thread doc/docs/api-reference/c/container-apis/wslcsetcontainerinitprocessiocallbacks.md Outdated
Comment thread doc/docs/api-reference/c/container-apis/wslcsetcontainerinitprocessiocallbacks.md Outdated
Comment thread doc/docs/api-reference/c/enumerations/wslcinstalloptions.md Outdated
Comment thread doc/docs/api-reference/c/install-and-version-apis/wslcinstallwithdependencies.md Outdated
Comment thread doc/docs/api-reference/c/install-and-version-apis/wslcinstallwithdependencies.md Outdated
Comment thread doc/docs/api-reference/c/session-apis/wslcsessionauthenticate.md Outdated
Comment thread doc/docs/api-reference/c/session-apis/wslcsessionauthenticate.md Outdated
Comment thread doc/docs/api-reference/cpp/core-classes/session.md
Comment thread doc/docs/api-reference/cpp/data-classes/installprogress.md Outdated
Comment thread doc/docs/api-reference/cpp/data-classes/serviceversion.md Outdated
Comment thread doc/docs/api-reference/cpp/enumerations/component.md Outdated
Comment thread doc/docs/api-reference/cpp/enumerations/component.md Outdated
Comment thread doc/docs/api-reference/cpp/enumerations/error.md
@@ -1,18 +1,29 @@
# WslcInstallWithDependencies

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, is there existing docs on call patterns for using this? Does a consumer have to run this in order to utilize WSLC first? Maybe add some docs on how this particular method is to be used properly.

Maybe some topical documentation on how to deploy and use the SDK and examples of using this method to call it.

Copilot AI review requested due to automatic review settings September 23, 2026 21:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

Three moderate documentation issues must be corrected before approval.

Review effort: Lite
Findings: None

Previously missed (1)

In code that hasn't changed since last review

Medium severity Missing System.Linq import makes IReadOnlyList Contains example fail

doc/​docs/​api-reference/​csharp/​service-class/​wslcservice.md:45

IReadOnlyList<T> does not define Contains; this call only resolves through the LINQ extension, but this reference example does not import System.Linq. As written, copying the snippet into a normal C# file fails to compile; use the same explicit foreach check shown in the end-to-end example (or document/add the required import).

This issue also appears on line 62 of the same file.

Copilot AI review requested due to automatic review settings September 23, 2026 22:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

Several documentation examples remain incomplete or do not compile as written.

Review effort: Lite
Findings: None

Previously missed (4)

In code that hasn't changed since last review

Low severity Declare PullImageOptions before assigning RegistryAuth

doc/​docs/​api-reference/​cpp/​data-classes/​authenticateresult.md:18

The example assigns to pullOptions, but this snippet never declares it, making the new authentication example incomplete as written. Create a PullImageOptions object before setting RegistryAuth.

Low severity Declare authentication before constructing the example

doc/​docs/​api-reference/​cpp/​settings-classes/​pushimageoptions.md:15

authentication is not declared anywhere in this snippet, so the constructor example cannot be compiled or copied as shown. Either demonstrate the preceding Session::Authenticate call or use an explicitly supplied registry-auth value.

Low severity Declare PullImageOptions before assigning registry authentication

doc/​docs/​api-reference/​csharp/​data-classes/​authenticateresult.md:19

The example assigns to pullOptions, but no variable with that name is declared in this page's snippet, so it cannot be copied as shown. Construct the PullImageOptions instance before assigning the returned registry authentication value.

Low severity IReadOnlyList.Contains requires LINQ or explicit iteration

doc/​docs/​api-reference/​csharp/​service-class/​wslcservice.md:44

IReadOnlyList<T> does not define Contains; this snippet has no using System.Linq, so the shown code does not compile as written. Iterate over missing (as the end-to-end example does) or include the required LINQ import.

This issue also appears on line 61 of the same file.

@florelis
Flor Chacón (florelis) marked this pull request as ready for review September 23, 2026 22:28
@florelis
Flor Chacón (florelis) requested a review from a team as a code owner September 23, 2026 22:28
Copilot AI review requested due to automatic review settings September 25, 2026 17:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Retain preview-status warnings and fix the undeclared authentication example variable.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 2 Low severity

Open (2)

- [End-to-End Example](end-to-end-example.md)
# WSL container API C reference

The WSL container API exposes a C API for creating sessions, creating containers inside those sessions, starting processes, managing images, managing VHD-backed storage, and checking/installing required platform components.

The WSL container API lets Windows app developers use Linux containers as part of their app logic. For an overview of the WSL container feature and the `wslc.exe` command-line interface, see [WSL container](https://learn.microsoft.com/windows/wsl/).

## API reference

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, we should remove that, but that can be done in a followup change

This branch has not been deployed

No deployments
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.

5 participants