-
Notifications
You must be signed in to change notification settings - Fork 701
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
How to build and deploy an unpackaged app made using C# "WinUI 3 in Desktop", so that I can distribute it to others? #6620
Comments
I have had similar issues as you trying to get unpacked WinUI 3 apps to run. Error messages if any are not helpful. It seems as many others have problems too. I think currently the best approach is to use the MSIX packaged apps approach. That has been trouble free for me so far in my early experiments. Yes that means signing the code with certificates but going forward that is the way to go. |
You mean that I should distribute the .msixbundle of my application, and users have to manually install the certificates, to install it? |
Yes, that would mean you distribute an xxx.msix file with all dependencies included. If you use a certificate from a recognized authority then there is no need for the users to manually install the certificates. Otherwise as you say they would need to install them manually. Still just for the initial install I believe. |
Can't I just create a Console Application, named as Setup, which the user just has to click, and it will install the certificate and sideload the application too. I am not asking for the steps; I am just asking 'Can't I'. |
I don't know but you might want to ask on the WinUI Community Call later today. In earlier calls they have been quite busy answering live questions. |
@Realinspirer Case 1If an error similar to the Windows Event Log occurs, it is considered a bug in the publish function.
Expected cause of problem Case 2Please include DDLM check and install in your program. Module Initializers : https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-9.0/module-initializers |
Will Self-contained feature come to WinUI 3? I have done many things, but still can't figure out the problem. I also checked the Event Logs; it just says that random (not same every time) dlls not found and sometime some other error. I checked if Self-contained is available or not, but didn't found much. I found out about this - |
@MikeHillberg FYI |
What? |
Is this the "next" generation of MS program? Project reunion? My experience has been nothing but bad about this WIN UI thing. Please make it an exe and when i double click on it, it runs everywhere. |
WinUI3 is still improving day by day. Don't worry everything will be fixed. And for the time being, you can use the MSIX packaging system, so it's not a big deal. Unpackaged apps are also there, but I think there's some deployment issue with that. And also, why to keep using the old school things, that's what I think. So, think ahead, and don't become a conservative. |
I'm trying to find a way to run a WINUI application the traditional way, just double-click the EXE file and launch it. |
I think that’s how it is supposed to be, just a double-click to open exe file, except for just requiring a runtime package. But for some problems/reasons that is not working. Even after installing the runtime package it is still failing to load up the app. I don’t know what to even do, and MSIX packaging is not the way to do it. The crazy part - the app I made ran on my PC (PC that I used to make it) and even on my old PC after I installed the runtime packages. But when I distributed it to others, it was not running on their PC, so I cleaned up my old PC, reinstalled Windows, then installed the runtime packages on that computer. AND TO MY SURPRISE IT DIDN'T RUN??? Why? I have no answer. Why did it ran the other time but not this time? Maybe there’s something that is required else than just the runtime package, but the main thing is that I DIDN'T USE MY OLD PC TO MAKE THAT APP! I seriously have no idea what the freak happened! Aaah… I think it’s just an everyday programmer problem lmao. |
I'm also struggling with this. I can get an unpackaged app building and working where I can run it right from the exe, but not when it's actually installed through a setup program. |
I am also facing the issue with exe of WinUI Unpackaged application. Please find below scenarios:
|
Are you using WebView2 by chance? If not, use the Event Viewer on windows to see if there are any application errors. Unfortunately, unpackaged apps aren’t working well at the moment so I would avoid building them until some big blockers are resolved. We had to switch to WPF in the meantime |
The unpackaged app doesn't run on any other machine than the development one, irrespective of Windows version. For me, I made my app on Windows 11, and it doesn't work on any other machine. |
I checked the event viewer, I don't think that helped. It said that there was some problem with random dlls. Well, it ran perfectly on the development machine. |
I'm assuming you all installed the required runtimes on those machines? I have no issue launching unpackaged exe's after they've been installed and assuming I'm not using any broken APIs like WebView2 |
Yeah, you sure can assume that. Well, I am not alone on the boat. Unpackaged apps are not running on different machines for many. Also, no, it didn't use WebView2. It was a simple app. |
Alright, well this looks like yet another issue for the long list of unpackaged app issues |
One more thing. Now that I think about it, I think that Event Viewer may have something interesting. Well, if I remember, one of the dll mentioned was 'PerfWatson' or something. But the point is that this dll is included in Visual Studio, right? Then why it's being mentioned in the unpackaged app's failure event log? Also note that, I am just trying to recall a few things from my memory, that's a bit foggy, so, I may not remember correctly. No I don't have Alzheimer's, it's just that I have tackled with WINUI 3 long ago. |
It's been more than a year, and developers still can't deploy their apps to one single exe? Ridiculous... |
But for the |
I recently made two unpackaged WinUI 3 desktop applications (using the Blank App, Packaged (WinUI 3 in desktop) project), and made an exe file by using the Publish option that is inside the right-click menu of the main project node.
The application ran just fine on my machine. Actually, I already installed the Windows App SDK runtime and MSIX packages, as mentioned in Create a WinUI 3 app that it is required to run the app. So, it worked fine on my machine.
Then I got on another PC, and tried to run the application, but it didn't run. I then installed the Windows App SDK runtime on that machine also, and then tried to run it, but it still didn't work.
I read many docs, and I am exhausted as hell. But still I didn't find any solution that worked. I just cannot make it work.
Can you guys tell me the steps to properly deploy my app, so that I can distribute it to users. And also, please mention the runtimes/things that the user has to install to make the app work.... Please try to give fewer external links to official docs, as I have have (I forgot grammar) enough of those. I said fewer, you can still mention them, as I must have missed many things. In short, JUST GIVE ME A SOLUTION!
The text was updated successfully, but these errors were encountered: