Repository navigation
Description
The Microsoft.NET.Sdk.WindowsDesktop is not built in source-build or any non-windows builds. However, it is redisted in MSFT builds (via package), and we end up with the N-1 version in the SDK layout. This usually doesn't make a functional difference because it has no internal reference to the live windowsdesktop shared framework versions. It does mean that it might be missing functionality though. The good news is that the targets and props files change very sparingly. There is also the PresentationBuildTasks msbuild task dll, which does change more often, but not constantly.
We need to get a live version of the SDK into non-windows builds. To do so, we will need to build both windowsdesktop as well as winforms, at least partially.
- Winforms -- very rough linux build
- The only assets that come out of winforms and are required are in the Microsoft.Private.Winforms package, and are the targets + props files in pkg\Microsoft.Private.Winforms\sdk\dotnet-wpf.
- The repo does not build cleanly on Linux. This is because it invokes msbuild.exe to build some specialized test assets. In theory, we could build the whole repo, just excluding some test projects, but it does seem like overkill
- On the other hand, hacking up the Microsoft.Private.Winforms package build to only include the wpf assets seems like a bad idea too.
- I lean towards splitting out the SDK assets into a separate private package, then enabling only that on Linux/Mac.
- WPF -- very rough linux build
- WPF needs two projects to produce the package properly. PresentationBuildTasks.csproj, and the Microsoft.NET.Sdk.WindowsDesktop.ArchNeutral.csproj project.
- I think it should be possible to just build those two projects to obtain the SDK.
- The WPF infra is a minefield. There are a few bits and pieces that would need to be worked around to make it possible to build on non-Windows. Building the whole repo is probably impossible.
- WindowsDesktop
- This is the traditional path that WPF/winforms use to flow into SDK winforms->wpf->windowsdesktop. It's not needed to get the windowsdesktop SDK into the sdk layout. I think we should avoid building this altogether, and instead change the dependency structure so that the VMR's sdk.proj depends on both wpf.proj and windowdesktop.proj, with windowsdesktop.proj excluded in non-windows builds.
It may be possible to eliminate the source-build non-source-build difference here too, depending on what prebuilts, if any, building the subset of winforms and wpf brings in.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
[-]WindowsDesktop sdk should flow in Linux builds[/-][+]Microsoft.NET.Sdk.WindowsDesktop should flow in Linux builds[/+][-]Microsoft.NET.Sdk.WindowsDesktop should flow in Linux builds[/-][+]Microsoft.NET.Sdk.WindowsDesktop should flow in Linux/Mac builds[/+]agocke commentedon Aug 11, 2025
Definitely impossible. It requires C++/CLI
ViktorHofer commentedon Aug 11, 2025
We chatted about this today in our SDK Partner sync meeting. The current restore mechanism and SDK acquisition make it very difficult to make this an online only scenario without moving more or less this whole package into dotnet/sdk.
Also, even if that support package gets moved, we still need the bundled version to fetch the WindowsDesktop targeting and runtime pack from feeds.
Based on that, we believe the best path forward is to build these repositories in minimal mode so that they produce that support package and insert it into SDK in the live build.
What I don't yet fully understand is what versions we need. Just the non-shipping version of
Microsoft.NET.Sdk.WindowsDesktopfrom wpf or also the shipping version from windowsdesktop?mmitche commentedon Aug 14, 2025
We need:
In the Windows builds, we also need the non-shipping version of WD. This allows us to locate the WD runtime in the following way:
<base artifact path>/WindowsDesktop/<non-shipping ver>/windowsdesktop-runtime-<shipping-ver>...However, I don't think this is required for Linux/Mac builds.Build windowsdesktop, wpf and winforms on Unix
Build windowsdesktop, wpf and winforms on Unix
Build windowsdesktop, wpf and winforms on Unix
Build windowsdesktop, wpf and winforms on Unix
Build windowsdesktop, wpf and winforms on Unix