Skip to content

Update WinUI setup documentation - #11759

Open
Sakshi Sharma (sakshisharma150905) wants to merge 1 commit into
mainfrom
user/sakshishar/update-main-docs
Open

Update WinUI setup documentation#11759
Sakshi Sharma (sakshisharma150905) wants to merge 1 commit into
mainfrom
user/sakshishar/update-main-docs

Conversation

@sakshisharma150905

Copy link
Copy Markdown
Contributor

Description

Updates the public WinUI build documentation following the migration from winui3/main to main.

This change:

  • Updates README.md and GettingStarted.md to reference the main branch.
  • Clarifies that OneTimeSetup.cmd -Install MSBuild installs or modifies Visual Studio 2022 Build Tools.
  • Adds instructions for configuring an existing Visual Studio 2026 installation using the repository's .vsconfig file.
  • Documents that init.cmd may select an installed Build Tools instance and explains how to resolve missing Microsoft.NET.Sdk or Microsoft.Windows.UI.Xaml.*.targets errors.

Only the public documentation is updated; no setup scripts, workflows, or build behavior are changed.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@microsoft-github-policy-service microsoft-github-policy-service Bot added the needs-triage Issue needs to be triaged by the area owners label Sep 2, 2026
@sakshisharma150905

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
1 pipeline(s) were filtered out due to trigger conditions.

@harshit7962 Harshit (harshit7962) 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.

LGTM

Comment thread GettingStarted.md
Comment on lines +29 to +37
* Otherwise, run the following command to install or configure Visual Studio 2022 Build Tools:

```
cd C:\winui3
.\OneTimeSetup.cmd -Install MSBuild
```

`OneTimeSetup.cmd -Install MSBuild` always targets Visual Studio 2022 Build Tools. Do not run it
to configure an existing Visual Studio 2026 installation.

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.

Is VS2022 needed at all?

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.

No

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.

Then I recommend deleting the scripts, docs, etc. and instead have one step of steps utilizing VS2026.

Comment thread GettingStarted.md
Comment on lines +274 to +276
Studio installation. If initialization reports missing `Microsoft.NET.Sdk` or
`Microsoft.Windows.UI.Xaml.*.targets` files under a Visual Studio installation, use Visual Studio
Installer to add the components from `.vsconfig` to that installation.

@riverar Rafael Rivera (riverar) Sep 2, 2026

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.

But you just said those files were for VS2026--how does this resolve the errors when using VS2022 build tools?

@riverar Rafael Rivera (riverar) 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.

I just tested this on another fresh machine and it fails miserably. Please stop guessing and test your dev docs.

Comment thread GettingStarted.md
with Visual Studio 2026 if all necessary components are installed.
* `OneTimeSetup.cmd -Install MSBuild` installs or modifies Visual Studio 2022 Build Tools. To use
Visual Studio 2026, import the repository's `.vsconfig` file into that installation instead.
* `init.cmd` may select an installed Visual Studio Build Tools instance instead of a full Visual

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.

The init script installs build tools. So this sentence is wrong.

@codendone Mike Crider (codendone) 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.

More changes are needed overall, but this change is a step forward and I think is an important fix to approve as a separate incremental improvement.

Comment thread GettingStarted.md
Visual Studio 2026, import the repository's `.vsconfig` file into that installation instead.
* `init.cmd` may select an installed Visual Studio Build Tools instance instead of a full Visual
Studio installation. If initialization reports missing `Microsoft.NET.Sdk` or
`Microsoft.Windows.UI.Xaml.*.targets` files under a Visual Studio installation, use Visual Studio

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.

In my recent test, I hit this Microsoft.Windows.UI.Xaml.*.targets file issue even when using OneTimeSetup.cmd on a clean machine (using the .vsconfig file). I think the .vsconfig file needs to be updated to add some missing component(s) (presumably caused by some changes to VS components). I think it is fine to do that .vsconfig update as a separate PR.

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

Labels

needs-triage Issue needs to be triaged by the area owners

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Can't build using documented steps; init.cmd throws a bunch of errors

6 participants