microsoft / microsoft/WindowsAppSDK
Cannot build WinUI wapproj with .NET SDK
- Dominant language
- C++
- Stars
- 4.7k
- Forks
- 471
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 28
Description
### Describe the bug
The following error occurs when using `dotnet build` from .NET SDK to build a C# WinUI app packaged with a WAP project.
```
error MSB4019: The imported project "C:\Program Files\dotnet\sdk\6.0.401\Microsoft\DesktopBridge\Microsoft.DesktopBridge.props" was not found. Confirm that the expression in the Import declaration "C:\Program Files\dotnet\sdk\6.0.401\\Microsoft\DesktopBridge\\Microsoft.DesktopBridge.props" is correct, and that the file exists on disk.
```
### Steps to reproduce the bug
1. Open Visual Studio 2022
2. Create a new project
3. Create from template "Blank App, Packaged with Windows Application Packaging Project (WinUI 3 in Desktop)"
4. From the directory of the new solution run `dotnet build`
5. Observe `error MSB4019: The imported project "C:\Program Files\dotnet\sdk\6.0.401\Microsoft\DesktopBridge\Microsoft.DesktopBridge.props" was not found. Confirm that the expression in the Import declaration "C:\Program Files\dotnet\sdk\6.0.401\\Microsoft\DesktopBridge\\Microsoft.DesktopBridge.props" is correct, and that the file exists on disk.`
### Expected behavior
*.wapproj should build without error.
### Screenshots
_No response_
### NuGet package version
_No response_
### Packaging type
Packaged (MSIX)
### Windows version
Windows 10 version 21H2 (19044, November 2021 Update)
### IDE
Visual Studio 2022
### Additional context
Versions used:
Windows App SDK 1.1.5
Microsoft.Windows.SDK.BuildTools 10.0.22621.1
Windows App SDK C# VS2022 Templates 1.1.3.80461806
.NET SDK version 6.0401
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.