microsoft-ui-xaml
microsoft-ui-xaml copied to clipboard
Published App from Default WinUI 3 Template Is Unresponsive
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:
- If I deploy the app, the exe file does not respond. The blue progress wheel momentarily appears, but nothing else happens.
- If I publish the app, the Setup,exe completes successfully, but when I try to run the installed app, again it is unresponsive.
- If I add this line of code:
<WindowsAppSDKSelfContained>true</WindowsAppSDKSelfContained>to the project file, the deployed version runs correctly. - 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
- Open Visual Studio 2022
- Click "Create a new project"
- Select "Blank App Packaged (WinUI 3 in Desktop)
- Click Next
- Click Create
- 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
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
i wonder why this issue isnt resolved? without this fix i wouldn't have known how to fix the issue with deploying my app.
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
I built a WinUI3 App and now I can't published it to use the App on another computer 😣
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.
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!
And currently it has not been fixed.
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!