-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
WPF .exe published using PublishTrimmed fails to launch #50689
Comments
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label. |
You can use this in your csproj:
|
Tagging subscribers to 'linkable-framework': @eerhardt, @vitek-karas, @LakshanF, @tannergooding, @sbomer Issue DetailsDescriptionWhen building a WPF .NET app using
<PublishSingleFile>true</PublishSingleFile>
<SelfContained>true</SelfContained>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<PublishTrimmed>true</PublishTrimmed>
<PublishReadyToRun>true</PublishReadyToRun>
Configuration
|
Tagging subscribers to this area: @vitek-karas, @agocke, @CoffeeFlux, @VSadov Issue DetailsDescriptionWhen building a WPF .NET app using
<PublishSingleFile>true</PublishSingleFile>
<SelfContained>true</SelfContained>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<PublishTrimmed>true</PublishTrimmed>
<PublishReadyToRun>true</PublishReadyToRun>
Configuration
|
This is basically a duplicate of dotnet/sdk#14261 which was "moved" to the dotnet/wpf repo dotnet/wpf#3811. Currently, by default, WPF apps are basically broken when trimmed. And even if that is fixed (dotnet/sdk#14261 has some discussion how to do that), the size wins are not that good. |
@vitek-karas - can we close this as a duplicate of dotnet/wpf#3811? |
Yup, I think closing as a dup is correct. There's also a bug about adding a warning about trimming at dotnet/sdk#16716 |
Description
When building a WPF .NET app using
<PublishTrimmed>
the resulting.exe
fails to launch.dotnet new wpf -n TestApp
TestApp.csproj
:dotnet publish
bin\Debug\net5.0-windows\win-x64\publish\TestApp.exe
Configuration
@danmoseley
The text was updated successfully, but these errors were encountered: