maui icon indicating copy to clipboard operation
maui copied to clipboard

PublishSingleFile=true causes maui app to crash at launch

Open MaxWang-MS opened this issue 2 years ago • 1 comments

Description

Trying to set the PublishSingleFile to true during publishing causes maui apps to crash at launch on Windows.

Also using dotnet --version it seems that I am on 6.0.400, which according to the version selection dropdown on the issue creation page is not the latest version. But I just updated VS to 17.3 GA today and freshly installed maui from that installer, so I don't know why I am not "up-to-date". Additionally, I am confused whether .net version and "maui version" are the same (i.e. always in sync). If not how do I know the version of maui on my machine?

Deploying unpackaged exe on Windows also has other issues, please refer to #6202 for details.

Steps to Reproduce

  1. dotnet new maui
  2. dotnet publish -f net6.0-windows10.0.19041.0 -c Release -p:WindowsPackageType=None -p:PublishSingleFile=true
  3. run bin\Release\net6.0-windows10.0.19041.0\win10-x64\publish\NAMEOFAPP.exe
  4. Observe crash

Version with bug

6.0.400

Last version that worked well

Unknown/Other

Affected platforms

Windows, I was not able test on other platforms

Affected platform versions

Windows 11 10.0.22000 Build 22000, VS 17.3 GA

Did you find any workaround?

No

Relevant log output

No response

MaxWang-MS avatar Aug 10 '22 00:08 MaxWang-MS

Support for unpackaged apps is not quite there yet. The progress can be followed here: #3166

jfversluis avatar Aug 11 '22 09:08 jfversluis