Replies: 5 comments
-
Are you building for Platform=AnyCPU? What's the machine's cpus you're running this on? (x86? x64?) What MSIX packages do you have installed? Try this:
|
Beta Was this translation helpful? Give feedback.
-
In reply to DrusTheAxe:
Publisher : CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US Architecture : X64 ResourceId : Version : 0.218.840.0 PackageFullName : Microsoft.WindowsAppSDK.1.0-experimental1_0.218.840.0_x64__8wekyb3d8bbwe InstallLocation : C:\Program IsFramework : True PackageFamilyName : Microsoft.WindowsAppSDK.1.0-experimental1_8wekyb3d8bbwe PublisherId : 8wekyb3d8bbwe IsResourcePackage : False IsBundle : False IsDevelopmentMode : False NonRemovable : False IsPartiallyStaged : False SignatureKind : Developer Status : Ok`
Publisher : CN=giebi Architecture : X64 ResourceId : Version : 1.0.0.0 PackageFullName : 7cfc9a62-d22f-42a2-b2cd-4dfc523292e0_1.0.0.0_x64__7xyp89cdy0290 InstallLocation : IsFramework : False PackageFamilyName : 7cfc9a62-d22f-42a2-b2cd-4dfc523292e0_7xyp89cdy0290 PublisherId : 7xyp89cdy0290 IsResourcePackage : False IsBundle : False IsDevelopmentMode : True NonRemovable : False Dependencies : {Microsoft.WindowsAppSDK.1.0-experimental1_0.218.840.0_x64__8wekyb3d8bbwe, IsPartiallyStaged : False SignatureKind : None Status : Ok`
Publisher : CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US Architecture : X64 ResourceId : Version : 0.297.2018.0 PackageFullName : Microsoft.WindowsAppRuntime.1.0-preview3_0.297.2018.0_x64__8wekyb3d8bbwe InstallLocation : C:\Program IsFramework : True PackageFamilyName : Microsoft.WindowsAppRuntime.1.0-preview3_8wekyb3d8bbwe PublisherId : 8wekyb3d8bbwe IsResourcePackage : False IsBundle : False IsDevelopmentMode : False NonRemovable : False IsPartiallyStaged : False SignatureKind : Developer Status : Ok` |
Beta Was this translation helpful? Give feedback.
-
1, 2 or 3 steps are needed, depending If the packages are registered for you but not in use (satisfying dependencies) by other packages and not provisioned it's easy. To enumerate all WinAppSDK packages across all versions you can run this command:
As a more targeted list of just the 1.0-experimental1 packages try this:
To remove packages you can pass the enumerated list to
The remove cmdlet is smart enough to know if there's any ordering needed to handle it for maximum effect (e.g. remove main packages before frameworks). That's step #1. Remove-AppxPackage deregisters packages for the current user and, if not registered to any other user and not provisioned the packages will be physically removed (deleted). Next step (#2) is needed if they were provisioned (aka preinstalled) you need to deprovision them. You can list what packages are provisioned with the command NOTE: The Package can't be removed if they're needed to satisfy other packages' dependencies. If you run the 'get' cmdlet after the 'remove' and still see packages there's still someone dependent on them You may want to flip those - deprovision packages (#2) before deregistering packages (#1). Another reason you may not be able to remove a package is if others are dependent on it. You can determine if packages are dependent on these packages you're trying to remove by running this at an admin cmd prompt:
and check if any package is listed with a dependency on a WinAppSDK package. A framework package cannot be removed if its satisfying the dependency for other package(s). You need to remove all those packages first. That's step #3 (if you have packages depending on the WinAppSDK packages) |
Beta Was this translation helpful? Give feedback.
-
No. You'll notice the 1.0 experimental, preview and stable releases all use different package Names (...-experimental1.. vs ...-preview3... etc). Having different package Names ensures they are independent and unrelated (despite any coincidentally similar spellings - identical or not is all that matters). Any installed 1.0-experimental or preview releases will have no bearing if you're using 1.0 stable.
If you mean you don't see WinAppSDK's MSIX packages listed via MSIX packages can be enumerated via the powershell cmdlet |
Beta Was this translation helpful? Give feedback.
-
You may be running into the Store/non-Store-package-content-differs bug. Please run
to see what WinAppSDK packages you have installed and then run the If the installer fails with this error
then it's a known issue fixed in the upcoming 1.0.1 servicing release. You can find more details at #1953 (comment) |
Beta Was this translation helpful? Give feedback.
-
I just installed the latest version of VS 2022 /version 17.2.0 Preview 1.0 with the Windows App SDK on both of my development machines (the installer features configuration is exactly the same). I then create default WinUI apps on both machines (WAP and MSIX).
On one machine the apps build/run/deploy successfully. On the other machine the same default apps fail. I know what is happening but not why. I include screen shots:
*on the "bad machine" building adefault WinUI app throws an errors and this is what the Object Browser shows
-- below is a reference to what should be happening (but is not on the "bad machine")
The Application class encapsulates an app and provides the following services:
app entry point, particularly for various activation contracts
app lifetime management
app-scoped resources
unhandled exception detection
The Application object is typically provided in the initial XAML for App.xaml. The default project templates in Visual Studio generate an App class that derives from Application and provides an entry point where you can add initialization code.
The App class associates itself with the corresponding XAML by calling the generated InitializeComponent method in its _constructor
-- Note:
I tried opening the Solution that runs OK on the "good machine" in VS2022 VS 2022 /version 17.2.0 Preview 1.0 on the "bad machine" and it immediately throws this error
I don't have a clue why this is happening (btw, the machine which is failing to create default WinUI apps is my primary development machine (aka, here... "bad machine") so I'm a bit flummoxed.
on the Developer Feedback board... I discuss this issue in my 3rd comment (the initial post isn't about this specifically) here
https://developercommunity.visualstudio.com/t/Version-1720-Preview-10-:-installatio/1669429
Microsoft Windows [Version 10.0.19044.1566]
(c) Microsoft Corporation. All rights reserved.
C:\WINDOWS\system32>dotnet --info
.NET SDK (reflecting any global.json):
Version: 6.0.200
Commit: 4c30de7899
Runtime Environment:
OS Name: Windows
OS Version: 10.0.19044
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\6.0.200\
Host (useful for support):
Version: 6.0.2
Commit: 839cdfb0ec
.NET SDKs installed:
2.1.818 [C:\Program Files\dotnet\sdk]
3.1.416 [C:\Program Files\dotnet\sdk]
5.0.101 [C:\Program Files\dotnet\sdk]
5.0.303 [C:\Program Files\dotnet\sdk]
5.0.400 [C:\Program Files\dotnet\sdk]
5.0.401 [C:\Program Files\dotnet\sdk]
5.0.403 [C:\Program Files\dotnet\sdk]
5.0.405 [C:\Program Files\dotnet\sdk]
6.0.100 [C:\Program Files\dotnet\sdk]
6.0.200 [C:\Program Files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.All 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.13 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.0.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.15 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.18 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.19 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.22 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.10 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.14 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.0-rc.1.21452.15 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.0.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.15 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.18 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.19 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.22 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.10 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.14 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.0-rc.1.21451.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.0.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.15 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.18 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.19 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.22 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.6 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.8 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.9 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.10 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.14 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.0-rc.1.21451.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
C:\WINDOWS\system32>dotnet --info
.NET SDK (reflecting any global.json):
Version: 6.0.200
Commit: 4c30de7899
Runtime Environment:
OS Name: Windows
OS Version: 10.0.19044
OS Platform: Windows
RID: win10-x64
Base Path: c:\program files\dotnet\sdk\6.0.200\
Host (useful for support):
Version: 6.0.2
Commit: 839cdfb0ec
.NET SDKs installed:
5.0.405 [c:\program files\dotnet\sdk]
6.0.100-rc.2.21505.57 [c:\program files\dotnet\sdk]
6.0.200 [c:\program files\dotnet\sdk]
.NET runtimes installed:
Microsoft.AspNetCore.All 2.1.13 [c:\program files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.24 [c:\program files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.13 [c:\program files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.24 [c:\program files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.28 [c:\program files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.13 [c:\program files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.22 [c:\program files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.4 [c:\program files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 5.0.14 [c:\program files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.0-preview.7.21378.6 [c:\program files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.0-rc.2.21480.10 [c:\program files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 6.0.2 [c:\program files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.28 [c:\program files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.13 [c:\program files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.22 [c:\program files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.4 [c:\program files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.14 [c:\program files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.0-preview.7.21377.19 [c:\program files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.0-rc.2.21480.5 [c:\program files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.2 [c:\program files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.13 [c:\program files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.22 [c:\program files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.4 [c:\program files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.14 [c:\program files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.0-preview.7.21378.9 [c:\program files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.0-rc.2.21501.6 [c:\program files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.2 [c:\program files\dotnet\shared\Microsoft.WindowsDesktop.App]
MORE INFORMATION:
On the "bad machine" I open the Project in Visual Studio.
2- Unload the project and save
3- Close Visual Studio
4- Reopen Visual Studio and Reload the Project
5- Restore Nuget hangs....
Beta Was this translation helpful? Give feedback.
All reactions