Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BuildTools.MSIX] Not usable out of the box with vanilla WPF project #5061

Open
riverar opened this issue Jan 23, 2025 · 5 comments
Open

[BuildTools.MSIX] Not usable out of the box with vanilla WPF project #5061

riverar opened this issue Jan 23, 2025 · 5 comments

Comments

@riverar
Copy link
Contributor

riverar commented Jan 23, 2025

Description

I'm trying to use the Microsoft.Windows.SDK.BuildTools.MSIX NuGet package with a .NET Framework 4.8 WPF application and encountered an issue at build.

Steps to Reproduce

  1. Create a vanilla .NET Framework 4.8 WPF project
  2. Add the NuGet package Microsoft.Windows.SDK.BuildTools.MSIX version 1.2.20250107.1
  3. Build the project

Observed Behavior

Building the project fails with the following error:

[...]\build\Microsoft.Windows.SDK.BuildTools.MSIX.MrtCore.PriGen.targets(399,5): error APPX3217: SDK folder containing 'UAP.props' for 'UAP 7.0' cannot be located.

Workaround

Adding the NuGet package Microsoft.Windows.SDK.BuildTools version 10.0.26100.1742 resolves the error.

Question

Is there something I'm missing that would enable the Microsoft.Windows.SDK.BuildTools.MSIX package to work independently with the inbox Windows SDK?

@dongle-the-gadget
Copy link

I believe you’re supposed to bring in the regular BuildTools package, UWP on .NET 9, which is currently the only supported target, does that.

@riverar
Copy link
Contributor Author

riverar commented Jan 23, 2025

The package should then declare that as a dependency, right?

@riverar
Copy link
Contributor Author

riverar commented Jan 23, 2025

The aforementioned props file seems to be geared towards supporting both scenarios.

  <!-- Tools installed via nupkg -->
  <Target Name="_GetSdkToolsPathsFromPackage" Condition="'$(UseSdkBuildToolsPackage)' == 'true'" />

  <!-- Tools installed via SDK msi-->
  <Target Name="_GetSdkToolsPathsFromSdk" Condition="'$(UseSdkBuildToolsPackage)' != 'true'">
   ...

@dongle-the-gadget
Copy link

dongle-the-gadget commented Jan 23, 2025

Is EnableMsixTooling enabled?

@riverar
Copy link
Contributor Author

riverar commented Jan 23, 2025

Didn't test that; that would be out of scope with my vanilla WPF project test.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants