Skip to content

Microsoft.NET.Sdk.WindowsDesktop should flow in Linux/Mac builds #1512

Closed

Description

@mmitche

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.

Activity

  1. moved this to In Progress in .NET Unified Buildon Jul 16, 2025
  2. changed the title [-]WindowsDesktop sdk should flow in Linux builds[/-] [+]Microsoft.NET.Sdk.WindowsDesktop should flow in Linux builds[/+] on Jul 16, 2025
  3. changed the title [-]Microsoft.NET.Sdk.WindowsDesktop should flow in Linux builds[/-] [+]Microsoft.NET.Sdk.WindowsDesktop should flow in Linux/Mac builds[/+] on Jul 16, 2025
  4. agocke commented on Aug 11, 2025

    @agocke
    Member

    Building the whole repo is probably impossible

    Definitely impossible. It requires C++/CLI

  5. ViktorHofer commented on Aug 11, 2025

    @ViktorHofer
    Member

    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.WindowsDesktop from wpf or also the shipping version from windowsdesktop?

  6. mmitche commented on Aug 14, 2025

    @mmitche
    MemberAuthor

    We need:

    • The shipping version from WindowsDesktop, for the Ref and runtime packs -
    • The version of Microsoft.NET.Sdk.WindowsDesktop

    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.

  7. moved this from In Progress to Done in .NET Unified Buildon Aug 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions