3 ms·
It is quite complicated but at least it feels like it’s finally heading in the right direction. I recently did a deep dive into WinUI3 and the Windows App SDK a
by yesimahuman 5y ago
It is quite complicated but at least it feels like it’s finally heading in the right direction. I recently did a deep dive into WinUI3 and the Windows App SDK and finally they are separating these tools from the OS and making them available to packaged and unpackaged apps. I wouldn’t bother with any of the older approaches unless you have a reason to, as this is clearly the future.
Speaking of which, the reason your exe doesn’t open is because you’re likely building a packaged app. You can think of that like building and iOS/Android app where it comes with a bunch of extra metadata and hooks into the OS, but that means you can’t just launch the exe and it has to be installed using the new .msix installer format. Thankfully the Windows App SDK just added the ability to build unpackaged (I.e. classic win32 exe apps): https://docs.microsoft.com/en-us/windows/apps/windows-app-sdk/deploy-unpackaged-apps https://docs.microsoft.com/en-us/windows/apps/windows-app-sd...
I have built and tested both approaches and they work well, though unpackaged apps aren’t able to use certain APIs that expect “package identity” (I.e that special metadata I mentioned above)
- vixalien 5y agoI built a packaged app. The build outputs a .exe file in the build dir but when I click it, nothing happens. When I build using VS, VS automatically install the app for me and I can run it from the start menu.
- yesimahuman 5y agoYes you can’t run a packaged app just by double clicking the exe, as I mentioned above. But you can build unpackaged apps with the windows app sdk now.
- nickpp 5y agoWinUI3 unpackaged apps? In C++? I would be interested in learning more.
- yesimahuman 5y agoIn C++ or .NET (C#)/etc. I shared a link above
- datavirtue 5y agoUntil they change direction again. I was a complete .net acolyte until wasting years building projects on incomplete, politically hobbled, cool-chasing bullshit frameworks that were supposed to be finished but never were. Most of us are building businesses apps. We just want a god damned form builder where you can double click a control and fill in the action performed code. Instead we have web tech (heaping trash fire) and several abandoned XML-based UI nightmares. Oh, but the next XML nightmare is where it's at! ...and it will be done next year!
- yesimahuman 5y agoWeb tech is awesome. Electron and WebView2 are great platforms for building desktop apps, hence why the former is so popular and why the latter is starting to see huge adoption. And WebView2 makes interopting with .NET a lot easier so it’s not either or.
- vixalien 5y agoWhat they meant by saying they decoupled it from Windows SDK is that it is now only found in the Windows App SDK which in turn STRICTLY REQUIRES the Windows 10/11 SDK which also requires on other tool chains and eventually Visual Studio. I tried to build an unpackaged app but it didn't work (after I click run, the app closes immediately and some errors are spewed into the console. I can't understand the error and so can't Google)