Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when running a WinUI Unpackaged app in Visual Studio 2022 #10171

Open
ward-horsfall opened this issue Nov 15, 2024 · 1 comment
Open

Error when running a WinUI Unpackaged app in Visual Studio 2022 #10171

ward-horsfall opened this issue Nov 15, 2024 · 1 comment
Labels
bug Something isn't working needs-triage Issue needs to be triaged by the area owners

Comments

@ward-horsfall
Copy link

Describe the bug

Hi,

When I try to run a WInUI app in Visual Studio 2022 Community Version 17.12.0 in "Unpackaged" mode I get the following error:

System.Runtime.InteropServices.COMException
HResult=0x80040154
Message=Class not registered (0x80040154 (REGDB_E_CLASSNOTREG))
Source=System.Private.CoreLib
StackTrace:
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode)
at WinRT.ActivationFactory.Get(String typeName, Guid iid)
at Microsoft.UI.Xaml.Application.get__objRef_global__Microsoft_UI_Xaml_IApplicationStatics()
at Microsoft.UI.Xaml.Application.Start(ApplicationInitializationCallback callback)
at App4.Program.Main(String[] args) in G:\Data\Users\Ward\Documents\Visual_Studio_Projects\App4\obj\x64\Debug\net8.0-windows10.0.19041.0\win-x64\App.g.i.cs:line 26

This happens if I have it set to either x86 / x64.

The project type I create is: "Blank App, Packaged (WinUI 3 in Desktop)"

Note If I run it as a packaged app it runs without issue.

Thanks
Ward

Image

Image

Steps to reproduce the bug

In Visual Studio 2022 - create a project of type: "Blank App, Packaged (WinUI 3 in Desktop)".

Then set the package type to: (Unpackaged)

Expected behavior

No response

Screenshots

No response

NuGet package version

None

Windows version

No response

Additional context

No response

@ward-horsfall ward-horsfall added the bug Something isn't working label Nov 15, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage Issue needs to be triaged by the area owners label Nov 15, 2024
@castorix
Copy link

There must be, in the Project file :

<WindowsPackageType>None</WindowsPackageType>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-triage Issue needs to be triaged by the area owners
Projects
None yet
Development

No branches or pull requests

2 participants