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

How to generate the smallest possible publishing file for unpackaged Winui3 app? #9591

Closed
Shiiho11 opened this issue Apr 27, 2024 · 4 comments
Labels
needs-author-feedback Asked author to supply more information. no-recent-activity question

Comments

@Shiiho11
Copy link

Shiiho11 commented Apr 27, 2024

Question Overview
I want to try publishing an mini unpackaged Winui3 app.
The published file contains many window sdk DLL files, resulting in the large application files (approximately 30MB).
This is too big for a mini app.
Is there any way to remove these files while ensuring the normal operation of the program?

image

Detail

  1. I followed the Winui3 guidelines to create an unpackaged Winui3 app
  2. I used Markup<Windows PackageType>None</Windows PackageType>. I didn't use Markup<WindowsAppSDKSelfContained>(To minimize the size of published files as much as possible).
  3. PublishProfiles: deployment framework-dependent(To minimize the size of published files as much as possible).
  4. The published file contains many window sdk DLL files, resulting in the large application files.

Question

  1. These DLL files appear to be Windows SDK DLLs. Can't call the SDK that has been installed in some way?(I am a beginner, not sure if this is feasible)
  2. I just want to develop a small tool and distribute small executable files(unpackaged).
  3. Is there any way to remove these files while ensuring the normal operation of the program?
  4. Should I switch to Winui2 or UWP or Other UI frameworks?
@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage Issue needs to be triaged by the area owners label Apr 27, 2024
@Shiiho11 Shiiho11 changed the title How to generate the smallest possible publishing file for unpackaged app? How to generate the smallest possible publishing file for unpackaged Winui3 app? Apr 27, 2024
Copy link

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one. Thank you!

Open similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@ghost1372
Copy link
Contributor

turn off SelfContained

<SelfContained>false</SelfContained>
also you can use Trim

<PublishTrimmed>true</PublishTrimmed>
https://learn.microsoft.com/en-us/dotnet/core/deploying/trimming/trimming-options?pivots=dotnet-8-0

@DarranRowe
Copy link

turn off SelfContained

<SelfContained>false</SelfContained> also you can use Trim

<PublishTrimmed>true</PublishTrimmed> https://learn.microsoft.com/en-us/dotnet/core/deploying/trimming/trimming-options?pivots=dotnet-8-0

Out of curiosity, how small does this get for you? I am just wondering because a Hybrid CRT build of a C++ application is around 600KiB for the default template. It is closer to 515KiB if you don't mind having the dependency on the Visual C++ Redist.

@bpulliam bpulliam added needs-author-feedback Asked author to supply more information. question and removed needs-triage Issue needs to be triaged by the area owners labels May 2, 2024
Copy link
Contributor

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within 7 days of this comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-author-feedback Asked author to supply more information. no-recent-activity question
Projects
None yet
Development

No branches or pull requests

4 participants