question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot build WinUI3 Preview3 desktop package project in fresh installed VS

See original GitHub issue

Originally posted at https://github.com/microsoft/microsoft-ui-xaml/issues/3620#issuecomment-729466735 by @VagueGit .

This issue involves machine-wide shared component. You may need to reproduce it in a new VM.

I have two dev machines. One can build the preview 3 template project, one can’t. The error is Can't find SDK reference Microsoft.VCLibs and Microsoft.VCLibs.Desktop.

The working machine has VS installation upgraded since 16.0. It’s using electron-based VSInstaller UI. The not working machine has VS fresh installed for 16.8 and 16.9P1. It’s using WPF-based VSInstaller UI.

The newly installed machine misses unversioned Microsoft.VCLibs and Microsoft.VCLibs.Desktop here. image

After trying to modify the installation, I find that C++ UWP tools workload will bring Microsoft.VCLibs.Desktop. But nothing I tried brings Microsoft.VCLibs.

This may be a VS installer issue.

Update: Repairing the VS 16.9 instance fixes this for me.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:9
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

5reactions
placassecommented, Nov 19, 2020

Here is the two folders I took from my PC https://github.com/placasse/MicrosoftSDKs

2reactions
placassecommented, Nov 18, 2020

Thanks aoshiwik. This is effectively part of the documentation for WinUI 3. Unfortunately, it was already selected in my installation image

There is a manual workaround, I found C:\Program Files (x86)\Microsoft SDKs\Windows Kits\10\ExtensionSDKs\Microsoft.VCLibs and C:\Program Files (x86)\Microsoft SDKs\Windows Kits\10\ExtensionSDKs\Microsoft.VCLibs.Desktop on another computer not infected by Visual Studio 16.9 Preview. I copied those files on my disk to fix the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Preview channel release notes for the Windows App SDK
0-preview3 (see the Update a package section in Install and manage packages in Visual Studio using the NuGet Package Manager). Additionally, see ...
Read more >
Create a WinUI 3 app using Preview and Experimental ...
To create a WinUI 3 desktop app with C# using Windows App SDK 1.0 Preview 3: In Visual Studio, select File -> New...
Read more >
Windows App SDK Preview 3 Supports Non-MSIX WinUI 3 ...
Also, "You must download the Windows App SDK Preview Extension for Visual Studio to get the project templates and build unpackaged desktop apps ......
Read more >
Ask HN: Why is building Windows apps so complicated?
I installed Visual Studio overnight (it comes with all the tools that building ... I've been building a C# WinUI 3 app as...
Read more >
Can't create package for WinUI 3 Packaged app with plain . ...
Simply multi-target your library-projects like changing. <TargetFramework>net6.0</TargetFramework>. Run code snippet. Hide results.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found