microsoft-ui-xaml icon indicating copy to clipboard operation
microsoft-ui-xaml copied to clipboard

Published App from Default WinUI 3 Template Is Unresponsive

Open MaiastraMan opened this issue 2 years ago • 3 comments

Describe the bug

I have encountered an issue with publishing Win UI 3 apps. In order to rule out any issues with my code, I am just trying to publish the app generated from the default template, which only contains a "Click Me" button. The specifics of the issue are as follows:

  1. If I deploy the app, the exe file does not respond. The blue progress wheel momentarily appears, but nothing else happens.
  2. If I publish the app, the Setup,exe completes successfully, but when I try to run the installed app, again it is unresponsive.
  3. If I add this line of code: <WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained> to the project file, the deployed version runs correctly.
  4. However, if I try to publish the version of the app containing this line of code, the Setup,exe gives an error message and will not complete.

In the "Steps to reproduce the bug" section below I describe the simplest method to reproduce each of these behaviours. I have also ensured I have installed the latest stable SDK and RunTime, which are version 1.2. If anyone can advise me how to fix this issue then I would greatly appreciate it.

Steps to reproduce the bug

Setup

  1. Open Visual Studio 2022
  2. Click "Create a new project"
  3. Select "Blank App Packaged (WinUI 3 in Desktop)
  4. Click Next
  5. Click Create
  6. Click Run, and observe that the project runs successfully

Steps to Reproduce Deployment Bug 7. Right click on the project name, and click Deploy 8. Navigate to the deployment output folder (right click on project name and click properties, click on Debug, Open Debug Launch Profiles UI, copy the Layout Folder Path, and paste into Explorer) 9. Double Click the YourAppName.exe file. 10. Nothing happens: That is, the application does not open, but there is no error message displayed. The blue progress wheel is momentarily displayed.

Steps to Reproduce First Publishing Bug 11. Right click on the project name, and click Publish 12. Modify the publishing settings so they are compatible with your operating system 13. Click Publish 14. After the process completes, click the link to navigate to the output folder 15. Double click the Setup File, the setup process completes without issue. 16. Run the installed application, by clicking on the Start button and clicking on YourAppName. 17. As with the deployed version, nothing happens.

Steps to Fix Deployment Bug 18. Right click on the project name and click Edit Project File 19. Add the following property to the <PropertyGroup> element: <WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained> 20. Right click on the project name, and click Deploy 21. Double Click the YourAppName.exe file. 22. Now the app runs correctly.

Steps to Reproduce Second Publishing Bug 23. Repeat steps 11 to 15 24. This time, running the Setup gives an error message: "Cannot continue. The application is improperly formatted. Contact the application vendor for assistance." 25. Click on the "Details" button, which opens the log file. The informative part of this file states: "Exception reading manifest from .dll.manifest: the manifest may not be valid or the file could not be opened." This log file is attached. 26. Open the manifest file and observe that it is an extremely large file, and it is not clear which part is the problem (GitHub will not let me attach this).

FJEXNEJX.log

Expected behavior

The installed app to behave in the same way as the deployed app.

Screenshots

No response

NuGet package version

None

Windows version

Windows 11 (22H2): Build 22621

Additional context

No response

MaiastraMan avatar Mar 15 '23 23:03 MaiastraMan

i wonder why this issue isnt resolved? without this fix i wouldn't have known how to fix the issue with deploying my app.

ghost avatar Jul 09 '23 05:07 ghost

Hi, thanks for filing. The problem here might be that the WinAppSDK framework package isn't installed. When you press F5 in VS this will happen automatically. But if you just press the deploy button, then the dependencies aren't installed. Does that help? Thanks!

FYI @Scottj1s

JesseCol avatar Dec 12 '23 21:12 JesseCol

I built a WinUI3 App and now I can't published it to use the App on another computer 😣

patricksadowski avatar Feb 14 '24 16:02 patricksadowski

Same problem, I can't deploy it. Says my dll.manifest is incorrect. This should have been fixed a long time ago, this is why so many developers turn away from Microsoft. Very sad.

AceSyntax avatar Mar 26 '24 20:03 AceSyntax

Hi @AceSyntax , it sounds like your issue might be different. Would you mind opening a new issue with information about what version you're using and the full error message? Thanks!

JesseCol avatar Mar 26 '24 21:03 JesseCol

And currently it has not been fixed.

mmnj40 avatar Apr 13 '24 11:04 mmnj40

Hi, I notice this line in the repro steps:

Double Click the YourAppName.exe file.

For packaged apps like this one, you'll need to install the msix rather than run the .exe directly. I'm not sure if this is what other folks are hitting.

It shouldn't be necessary to add <WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained> to your project for it to work out of the box. By default, the blank app will use the WindowsAppRuntime framework package.

Are folks still seeing these problems on WinAppSDK 1.5?

Thanks!

JesseCol avatar Apr 15 '24 15:04 JesseCol