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.

Error while creating a WinUI 3, C# on Desktop project.

See original GitHub issue

Describe the bug Creating a new WinUI 3,0 project using the C# on Desktop (package) project results in an error:

A problem was encountered creating the sub project 'Arctium Sandbox Studio'. The expression "[Microsoft.Build.Utilities.ToolLocationHelper]::GetPlatformSDKLocation('', 10.0.18362.0)" cannot be evaluated. Parameter "targetPlatformIdentifier" cannot have zero length. C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Current\Bin\Microsoft.Common.CurrentVersion.targets

Steps to reproduce the bug

  1. Install the latest VS 2019 Preview+ .NET 5 (Preview 8/RC1)
  2. Install the WinUI 3.0 Preview2 extension.
  3. Create a WinUI C# on Desktop project.

Expected behavior It should create the project without any errors instead of failing.

Version Info WinUI 3 Preview 2

Windows 10 Pro Insider Preview Build 20170

Desktop

Additional context

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:8
  • Comments:24 (11 by maintainers)

github_iconTop GitHub Comments

5reactions
stevenbrixcommented, Aug 26, 2020

Here is the install script I use Install-DotNet.zip

If you run this in an admin powershell window: Install-DotNet -version 5.0.100-preview.5.20279.10. This will install both x86 and x64 to program files.

Then you can add a global.json that looks like this:

{
  "sdk": {
    "version": "5.0.100-preview.5.20279.10"
  }
}
4reactions
marcinsmialekcommented, Nov 8, 2020

With .NET 5 just around the corner, when do you think this will be fixed?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot create WinUI 3 Desktop project
Hi,. Creating new WinUI Desktop app ends up with following error in VS 2019 16.8 Preview 4: Clicking OK results in having just...
Read more >
Create your first WinUI 3 (Windows App SDK) project
In this topic we'll see how to use Visual Studio to create a new project for a C# .NET or C++ app that...
Read more >
WinUI 3.0 for desktop apps default project gives runtime error
I ran into this issue as well, updating .NET 5 SDK to preview 6 solved it for me.
Read more >
Windows UI 3 : Create your first WinUI 3 project | Fluent UI
Windows UI 3 : Create your first WinUI 3 project | Fluent UI WinUI is a user interface layer that contains native controls...
Read more >
Unwrapping WinUI3 for C++ - Marius Bancila's Blog
To get started with WinUI 3 for C++, you need: ... Trying to build this project, I got the following error in the...
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