dotnet / dotnet/sdk

Regression in .NET SDK 10.0.201: WPF build fails on Linux with EnableWindowsTargeting

Open
#53,508 5 comments 0 reactions 1 assignee Claimed by @baronfel View on GitHub
Area-NetSDK
Dominant language
C#
Stars
3.2k
Forks
1.3k
PR merge metrics
PR metrics pending

Description

### Describe the bug
With SDK 10.0.103 I was able to build WPF application in linux docker (bitbucket pipelines) using `true`.
When the image upgraded to 10.0.201 now it gives the exception `NETSDK1082`

This seems related when you have also `PublishSingleFile` in the csproj, but idk why it would matter since I'm only doing `dotnet build` not `dotnet publish`
Before this commit: https://bitbucket.org/ScarletKuro/wpfrepro/commits/4ecf75d8a9e334e31423f578591c9d817b96e715 it would build with 10.0.201 as well, but after only with 10.0.103

My use case is that I build it in CI for codecov and some tests not related directly to UI but it comes with the whole project that includes UI things as well and I want to verify whole project builds just fine.

### To Reproduce
Repository reproduction:
https://bitbucket.org/ScarletKuro/wpfrepro/src/master/

See commit (fail):
https://bitbucket.org/ScarletKuro/wpfrepro/commits/4ecf75d8a9e334e31423f578591c9d817b96e715
logs: https://bitbucket.org/ScarletKuro/wpfrepro/pipelines/results/9/steps/%7B29e9ab6c-b76c-4e6a-a8a5-4c2ad2e17c36%7D

See commit (ok):
https://bitbucket.org/ScarletKuro/wpfrepro/commits/b5647f1b3278e3c8120fc7b2587a3bc52fb38c90
logs: https://bitbucket.org/ScarletKuro/wpfrepro/pipelines/results/10/steps/%7B0615ed64-7b4e-4839-a111-37d8947ce2b1%7D

### Exceptions (if any)
```
/usr/share/dotnet/sdk/10.0.201/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(544,5): error NETSDK1082: There was no runtime pack for Microsoft.WindowsDesktop.App available for the specified RuntimeIdentifier 'linux-x64'. [/opt/atlassian/pipelines/agent/build/src/WinPOS.Kiisu.UI/WinPOS.Kiisu.UI.csproj]
/usr/share/dotnet/sdk/10.0.201/Sdks/Microsoft.NET.Sdk/targets/Microsoft.NET.Sdk.FrameworkReferenceResolution.targets(544,5): error NETSDK1082: There was no runtime pack for Microsoft.WindowsDesktop.App.WPF available for the specified RuntimeIdentifier 'linux-x64'. [/opt/atlassian/pipelines/agent/build/src/WinPOS.Kiisu.UI/WinPOS.Kiisu.UI.csproj]
```

### Further technical details
[pipelineLog-failed-sdk-10.0.201.txt](https://github.com/user-attachments/files/26072582/pipelineLog-failed-sdk-10.0.201.txt)
[pipelineLog-ok-sdk-10.0.103.txt](https://github.com/user-attachments/files/26072584/pipelineLog-ok-sdk-10.0.103.txt)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.