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

Certain files should be optional when publishing app as self-contained #27336

Open
vitek-karas opened this issue Aug 22, 2022 · 7 comments
Open
Milestone

Comments

@vitek-karas
Copy link
Member

For example:

dotnet new console
dotnet publish -r win-x64

The output directory will contain files like:

  • createdump.exe - only useful when trying to create a managed dump of the app's process
  • clrgc.dll - only useful when wanting to use different GC for the app (otherwise the default GC is part of coreclr.dll)
  • msquic.dll - only useful when using HTTP3 functionality
  • mscordaccore* and mscoredbi* - only useful for debugging
  • ... possibly others

Currently there's no way to tell the SDK to exclude some of these. Even with trimming turned on, some of these files are still there (and not used).

We should reconsider the list of files included in self-contained apps by default and if it would make sense to provide options to either opt-in or opt-out for some of them.

/cc @richlander

@vitek-karas
Copy link
Member Author

See dotnet/runtime#43716 for an example of customer report on this.

@nagilson nagilson added the needs team triage Requires a full team discussion label Aug 24, 2022
@baronfel baronfel added this to the Backlog milestone Aug 24, 2022
@baronfel
Copy link
Member

This sounds reasonable, but we'd need a more concrete proposal from the owners of these files - are there logical groups that would be turned off as a whole, for example?

@nagilson nagilson removed untriaged Request triage from a team member needs team triage Requires a full team discussion labels Aug 24, 2022
@nagilson nagilson removed their assignment Aug 30, 2022
@guboi
Copy link

guboi commented Nov 10, 2022

Do I understand that createdump.exe will be signed and packaged with apps by default? This could be a significant security concern.

@KalleOlaviNiemitalo
Copy link

KalleOlaviNiemitalo commented Nov 12, 2022

Does this issue cover the inclusion of unmanaged WPF DLLs in an app that uses Windows Forms but not WPF?

@vitek-karas
Copy link
Member Author

Do I understand that createdump.exe will be signed and packaged with apps by default? This could be a significant security concern.

@tommcdon could you please comment on this?

Does this issue cover the inclusion of unmanaged WPF DLLs in an app that uses Windows Forms but not WPF?

Probably the better place for this discussions is dotnet/winforms#3723

It's not part of this issue - this issue is about files which are included because some features of the runtime or developer experience make use of them. Mostly there's no way to tell if they are needed by just looking at the code of the app (this is sort of not true for msquic but it depends on the scenario).

Inclusion of WPF dlls in winform apps is mainly a problem for trimming which would require two things:

There's one more option - omit WPF dlls (even the managed ones) if UseWPF is not set. I don't know enough about the WPF SDK integration to tell if this can be breaking for some apps which use WPF classes without UseWPF today.

@NCLnclNCL
Copy link

yes

@lonix1
Copy link

lonix1 commented Sep 13, 2023

I am getting the crashdump executable, even for a normal publish (i.e. not self-contained), on linux.

env: .net7, docker, linux

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

7 participants