Skip to content

Remove WiX prebuilt from Workloads tooling by removing the PackageReference during source-build #8014

@dagood

Description

@dagood
  • This issue is blocking
  • This issue is causing unreasonable pain

Microsoft.DotNet.Build.Tasks.Workloads.csproj pulls in a WiX NuGet package, which is not currently built from source:

<Reference Include="$(WixInstallPath)\Microsoft.Deployment.Resources.dll" />
<Reference Include="$(WixInstallPath)\Microsoft.Deployment.Compression.dll" />
<Reference Include="$(WixInstallPath)\Microsoft.Deployment.Compression.Cab.dll" />
<Reference Include="$(WixInstallPath)\Microsoft.Deployment.WindowsInstaller.dll" />
<Reference Include="$(WixInstallPath)\Microsoft.Deployment.WindowsInstaller.Package.dll" />

https://www.nuget.org/packages/WiX/3.11.2

I'd like to remove this package and those references when Arcade builds under source-build. I see a few ways to do it:

  • Exclude all .cs files from the build that use the reference.
    • Could either move some .cs files into a "WiX" subdir and exclude it from the build, or rename some files to .wix.cs and exclude it with a pattern.
  • Use compiler directives and the preprocessor to tweak the files at a deeper level.
  • Create a new Arcade project that contains WiX functionality and link it in as a separate package. This is easier to maintain (your IDE helps you stay within the guard rails rather than only seeing issues during source-build) but probably harder to set up.

@joeloff, @pjcollins, do you think this approach of making the WiX NuGet reference conditional for source-build sounds reasonable?
(Are there more people who should weigh in? I just peeked at Git history. 😄)

I can try it out and submit a PR for you take a look if you don't have the bandwidth to spare. (I'm temporarily helping with the 6.0 source-build prebuilt removal effort overall.)


@dseefeld is also looking at whether the WiX package can decompiled into https://github.com/dotnet/source-build-reference-packages (SBRP). This means the DLL can't actually be executed anymore, but it seems unlikely that the WiX DLLs would actually be used for Linux/macOS builds from source, so that is probably fine. But, potential problems:

  • The MS-RL license could be an issue. I believe it's a brand-new license as far as .NET source-build is concerned.
  • The unusual way the WiX package's DLLs are laid out (in tools/) doesn't work well with the existing SBRP tooling.
  • Putting the WiX package in SBRP also increases maintenance burden when the package gets updated.

The potential issues with that approach are why I'm investigating if removal is possible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs TriageA new issue that needs to be associated with an epic.help wanted

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions