question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

App will be Crash with an InfoBar and Publish as Single File Option

See original GitHub issue

Describe the bug

If we have an InfoBar in MainWindow and publish it as a Single File (PublishSingleFile = true) App will not run and will crash.

Steps to reproduce the bug

1.Create a New WinUI 3 Project 2.Change To Unpackaged Project <WindowsPackageType>None</WindowsPackageType> 3. Add InfoBar on MainWindow

<Window
    x:Class="App1.MainWindow">
    <StackPanel>
        <InfoBar
                        Title="Up To Date"
                        IsClosable="False"
                        IsOpen="True"
                        Severity="Success" />
    </StackPanel>
</Window>
  1. Publish Project as Single File (PublishSingleFile = true)
  2. Run Published App

Expected behavior

App should run without any problems

Screenshots

No response

NuGet package version

1.0.0

Packaging type

Unpackaged

Windows version

Windows 11 version 21H2 (22000)

IDE

Visual Studio 2022

Additional context

No response

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:17 (15 by maintainers)

github_iconTop GitHub Comments

2reactions
riverarcommented, May 24, 2022

Can confirm @ghost1372. Appears to be a WinUI issue but I don’t blame you for posting it here since that repository is more/less dead. Maybe @gabbybilka or @marb2000 can help route.

Related: microsoft/microsoft-ui-xaml#6400, microsoft/microsoft-ui-xaml#7063, microsoft/microsoft-ui-xaml#6757, etc.

Best guidance for you right now is to completely avoid using Single File publishing for all WinUI/WinAppSDK work.

1reaction
Scottj1scommented, Jun 21, 2023

@ghost1372 No updates - hopefully soon. Thanks for your patience.

Read more comments on GitHub >

github_iconTop Results From Across the Web

App will be Crash with an InfoBar and Publish as Single ...
If we have an InfoBar in MainWindow and publish it as a Single File (PublishSingleFile = true) App will not run and will...
Read more >
Welcome to Hell - Windows Publishing with .NET MAUI
NET MAUI app as a single file for Windows, please let me know. ... App will be Crash with an InfoBar and Publish...
Read more >
Create a single file for application deployment - .NET
The single file deployment option can be combined with ReadyToRun ... Publish a single file application using the dotnet publish command.
Read more >
.Net 5 Self-contained single file deployment of default ...
Create a new project using Winforms App .Net C# template. Publish as single file self-contained deployment. App fails to start (or gives an...
Read more >
A published single-file app crashes on startup under ...
A published single-file app crashes on startup under Windows 7 (.NET 5.0, self-contained). CS CS.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found