Help, can't install Windows App SDK, #1933
-
I checked my installed things with winget, and nothing in the list indicates "Microsoft.WindowsAppRuntime" I'm using Windows 10 21H1, Visual Studio 2022 is also installed. Windows App SDK vsix thing is also installed. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 12 replies
-
This should be handled which implies it's not that straightforward. Please run the following command and share the result:
@sachintaMSFT for follow up |
Beta Was this translation helpful? Give feedback.
-
MSIX supports different types of package: Main, Framework, Optional, Resource, Bundle. Oversimplistically put, Main is to Framework as Exe is to DLL, or Process is to Thread. The key differences: Main packages can declare To round things out, Optional packages are akin to taking a Main package and slicing it into a required (Main) and optional packages, then you can install the required (Main) package and 0+ Optional. At runtime the Optional packages run in the context of the Main package. For conceptual uses think of DLCs for games, or the Adobe or Office suite where e.g. you install Office and have Word, Excel and Powerpoint installed but not Visio. Resource packages are meant for localization resources. Bundles are very different beasts. They provide a convenient way to pack multiple related packages into a package for easier distribution. You may also find mention of 'XAP'. That's an old concept from Windows Mobile and was never supported elsewhere. Windows App SDK is deployed via multiple MSIX packages. TL;DR WinAppSDK's is installed via framework and main packages. It's not just a framework package. This is significant for below.
That's the "PublisherId" which, yes, is a hash of "Publisher". As Publisher can be up to 4K long and contain spaces, backslashes and other inconvenient ;-) characters it's rather awkward for common use. PublisherId is a hashed form of Publisher, which we Base-32 encode (using the Crockford variant) resulting in a short string of case-insensitive alphanumerics. Package identity is a 5-tuple: Name, Version, Architecture, ResourceId, Publisher. This can be expressed as a struct (PACKAGE_ID), WinRT object (PackageId), or other syntax. Package Full Name is a convenient stringified syntax for package identity (name_version_architecture_resourceid_publisherId). P.S. Package Family is a 2-tuple: Name, Publisher. Again, multiple ways to express it though the string form of PackageFamilyName (name_publisherid) is the most common one.
That shouldn't happen so I suspect something isn't quite what it seemed. But it's unclear why w/o more data and it's a bit late to collect that now to explore further. If you see this again (or similar issues) please use FeedbackHub to collect data for further analysis. Most importantly, when defining a FeedbackHub issue make sure Category is Developer Platform / App Deployment
TL;DR you can, but unfortunately not efficiently today. You can do it inefficiently, if you're willing to negatively impact common developer experiences (e.g. build). We'd prefer not to. Primum non nocere ("first, do no harm"). The more involved explanation... That question has 2 answers given the 2 scenarios (packaged+unpackaged), each with 2 sub-scenarios (product+devtime). If you're an unpackaged app then your product install needs to also install WinAppSDK's runtime. You can install the appropriate MSIX packages and licenses, or as a convenience run At devtime, assuming you use VS, VS has no support to install the MSIX packages when you hit F5 (or any other action). This is something we'd like to address but doing so (well) is difficult. In VS there are multiple pathways to launch an app (just look at Run vs Debug, which themselves aren't just 2 code paths) and VS currently lacks the necessary hooks to reliably add install if-necessary logic. Well, that's not entirely true. It's possible -- if you do so as a post-build event. Meaning every time you build. That 'tax' always doing so (no matter how much or little you build) is unappealing. It's in our backlog but not something we could bake out for 1.0. If this interests you please share your feedback to help us identity features of interest to the community and where to prioritize our efforts (after all there's only so many days in an hour 😉) If you're a packaged app and MS Store distributed then Store can automagically download and install your framework package dependencies if/when needed, but there's currently no support to install other 'related' main packages -- because it doesn't know there's a dependency. Store knows you depend on a framework package because your Main package's At devtime, VS has support to install framework dependencies but not 'related' main packages. This is why using VS to develop a packaged app may install parts of WinAppRuntime but an incomplete subset. The Deployment API addresses this for devtime equally well as for runtime. Alternatively, if you're a packaged app but not Store distributed (or simply have no network connection) you can directly install WinAppSDK's runtime just like unpackaged apps do. |
Beta Was this translation helpful? Give feedback.
-
I'd like to point out that this exact situation just bit me while I was trying to follow the ms docs for a new WinUI3 app. It threw an exception on the first run of an unpackaged app.
I also had the WinUI 3 Controls Gallery installed from the Windows Store. The ps command mentioned above netted me two installed packages:
After some manual uninstalling via Then, the PS query was far more fruitful:
The two exes installed a total of 5 packages where there were previously two. This completely solved the Visual Studio issue, and I was immediately able to run the sample project without the exception. Is it possible that the provided installers immediately quit when they see that the Microsoft.WindowsAppRuntime.1.0 is installed, but fail to check for the Microsoft.WindowsAppRuntime.Singleton and Microsoft.WinAppRuntime.DDLM packages? |
Beta Was this translation helpful? Give feedback.
-
Just ran into the same problem, updating Nuget packages in Visual Studio (Microsoft.Windows.SDK.BuildTools and Microsoft.WindowsAppSDK) did the trick for me. |
Beta Was this translation helpful? Give feedback.
0x80073cfb
=ERROR_PACKAGE_ALREADY_EXISTS
The provided package is already installed, and reinstallation of the package was blocked. Check the AppXDeployment-Server event log for details.
This should be handled which implies it's not that straightforward.
Please run the following command and share the result:
@sachintaMSFT for follow up