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

Proposal: remove requirement for CRT Redist if app is not using the CRT itself #2143

Closed
Scottj1s opened this issue Feb 22, 2022 · 3 comments
Closed
Assignees
Labels
area-Deployment Issues related to packaging, installation, runtime (e.g., SelfContained, Unpackaged) feature proposal servicing-consider
Milestone

Comments

@Scottj1s
Copy link
Member

Scottj1s commented Feb 22, 2022

Describe the bug

The docs call out a requirement to explicitly include a CRT redistributable - either the VCLibs framework package or the VCRedist msi:
https://docs.microsoft.com/en-us/windows/apps/windows-app-sdk/deployment-architecture#additional-requirements

This requirement is solely due to implementation details of Windows App SDK binaries. For example, microsoft.ui.xaml.dll dynamically links to the CRT, requiring app installers to provision those binaries at runtime.

Ideally, only an app's use of the CRT should necessitate the CRT redistributable.

Steps to reproduce the bug

  1. Create a Windows App SDK app from a C# template
  2. Configure the project as needed for packaged/unpackaged deployment
  3. Build and deploy either locally or remotely to a device without the VCLibs.UwpDesktop framework package installed (for a packaged app) or the VCRedist installed (for an unpackaged app)
  4. The app fails at launch with missing dependencies when trying to load microsoft.ui.xaml.dll (or other Windows App SDK binaries).

See related:
#2117

Expected behavior

A Windows App SDK app that does not use the CRT should run without the CRT redist present on a target machine.

Screenshots

No response

NuGet package version

No response

Packaging type

No response

Windows version

No response

IDE

No response

Additional context

No response

@Scottj1s Scottj1s added feature area-Deployment Issues related to packaging, installation, runtime (e.g., SelfContained, Unpackaged) labels Feb 22, 2022
@Scottj1s Scottj1s self-assigned this Feb 22, 2022
@mikebattista
Copy link

This should work for self-contained as well. Packaged/unpackaged self-contained C# apps shouldn't require any CRT redist.

@Scottj1s
Copy link
Member Author

@mikebattista correct, the solution here will use "Hybrid CRT" linkage for WinAppSDK binaries, rather than simply hiding dynamic CRT linkage from apps. So self-contained apps that embed the WinAppSDK binaries will benefit as well.

@AdamBraden AdamBraden added this to the 1.1 milestone Feb 22, 2022
@Scottj1s
Copy link
Member Author

Fixed in WinAppSDK 1.0.2 servicing release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Deployment Issues related to packaging, installation, runtime (e.g., SelfContained, Unpackaged) feature proposal servicing-consider
Projects
None yet
Development

No branches or pull requests

4 participants