Replies: 2 comments 1 reply
-
I think that the templates should have included C++/WinRT already, and also, forcing the Windows App SDK package to also install C++/WinRT on every installation would be ridiculous (why would I need C++/WinRT if I'm using C#). For the second scenario, shouldn't VS handle MSIX dependencies already? |
Beta Was this translation helpful? Give feedback.
-
I also got bitten by the "class not registered error at runtime" problem when converting a project from WinUI2 to WinUI3. I had to enable loader snaps to figure out which module could not be loaded and then it took a while to figure out why it couldn't be loaded. That took at least an hour or two along with a lot of debugging expertise. |
Beta Was this translation helpful? Give feedback.
-
I want to point out issues I had when setting up a project to use Windows App SDK. Because, if I'm having these issues, I bet other developers are facing the same issues and walk away from Windows App SDK.
Setting up my dev environment for developing apps that use Windows App SDK is too cumbersome because I couldn't easily find the solution to my problems online.
Here are the problems I faced, what the symptoms were, and how they were fixed.
First scenario: Making an unpackaged C++ app that used Windows App SDK and following this guide.
WindowsPackageType
is set tonone
:Project "AppLifeCycleTest" targets platform "Windows", but references SDK "Visual C++ 2015-2019 Runtime for Universal Windows Platform Apps v14.0" which targets platform "UAP"
. andProject "AppLifeCycleTest" targets platform "Windows", but references SDK "Visual C++ 2015-2019 UWP Desktop Runtime for native apps v14.0" which targets platform "UAP"
<WinUISDKReferences>false</WinUISDKReferences>
in the.*proj
file.Release Channels and Release Notes
-> Click on the version for latest release for stable -> ClickDownload installer
.Second scenario: Making a packaged C++ app that uses Windows App SDK and is built with Desktop Bridge.
get-appxpackage
to find the framework package.As I said above. This post is to bring to light some of the issues faced when developing with Windows App SDK.
I'll follow up with this post by engaging the documentation team to add these pointers.
EDIT:
Didn't mean to post this in questions. I just wanted to start a discussion.
EDIT 2:
When looking up self-contained deployment I found this that does mention having to declare a package dependency to the framework package.
EDIT 3:
Made issues to track these.
CppWinrt needs to be installed, else VS can't find Windows App SDK headers.
Cryptic errors when WindowsPackageType is set to none.
Bootstrapper crashes if a package can't be found.
Docs for adding Windows App SDK to an existing project does not instruct devs to depend on the framework package.
Beta Was this translation helpful? Give feedback.
All reactions