microsoft / microsoft-ui-xaml

Windows UI Library: the latest Windows 10 native controls and Fluent styles for your applications
MIT License
6.28k stars 675 forks source link

Question: [How to publish WinUI3 app installer] #6275

Closed EugenM88 closed 2 years ago

EugenM88 commented 2 years ago

Hello guys, im very new to WinUI3 and to be frank all my life ive been using VS publish feature, be it to deploy a Winforms, WPF or UWP app.

Ive been trying WinUI3, namely a C# blank packaged app, i can run it just fine in visual studio while debugging but i have no clue why published x64 files or x86 files dont work at all, as soon as i click the only executable in the published folder the app doesnt start or install or give any promt message, ive been trying like 3 new blank apps to be 100% sure i didnt mess anything up and still im unable to create any installer whatsoever, im very sure im missing something here, any help is greatly appreciated.

Im currently using VS2022 Community (normal release and also preview) with WinUI3 1.0 preview 3.

Thank you very much for your help!

EugenM88 commented 2 years ago

Hey guys, ive been trying to do some more testing, and successfully created a clickonce installer which installs without error, but as soon as i try to open the application, still, nothing happens, main window doesnt appear, neither does an error message or anything pops up.

Im running Win10 Pro, 21h1, im pretty sure something is still missing... Any ideas what else i could try?

Thanks in advance!

EugenM88 commented 2 years ago

One more update, ive been able to sucessfully publish the application if i choose Winui3 Blank App with Packaged with WAP, then i just publish the "Project Name" (Package) and from there on it publishes as if it was an UWP app, except it runs outside UWP sandboxed design as intended, tried to check for existance of a file on C:\ main directory with System.IO.File.Exists and it detects the file sucessfully.

Is it possible to create a clickOnce installer or a .msi instead to avoid sideloading and unnecessary certificates?

Petrarca181 commented 2 years ago

Ms guide

external guide

ghost1372 commented 2 years ago

Hi @eugenm88 this is a bug and will be fix in 1.0 GA https://github.com/microsoft/WindowsAppSDK/issues/1677

EugenM88 commented 2 years ago

Oh i see, for a moment i thought it must be me thats missing something as im just trying to get the hang on this amazing api.

Thank you very much for confirming this will be fixed!