You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replace the default settings in Registry at HKEY_CLASSES_ROOT\Folder\shell\opennewwindow\command to activate the application though press Win + E.
However, app that use Windows App Sdk could not be activated at this situation. TypeInitializationException was threw in AppInstance.GetCurrent(), message: 0x80040154 (REGDB_E_CLASSNOTREG).
Just to mention that activate the application though command line will not raise any exception.
at WinRT.ActivationFactory`1.As(Guid iid)
at Microsoft.Windows.AppLifecycle.AppInstance.Make___objRef_global__Microsoft_Windows_AppLifecycle_IAppInstanceStatics()
at Microsoft.Windows.AppLifecycle.AppInstance.get__objRef_global__Microsoft_Windows_AppLifecycle_IAppInstanceStatics()
at Microsoft.Windows.AppLifecycle.AppInstance.GetCurrent()
at CommandLineTest.Program.Main(String[] args)
at C:\Users\zrfcfgs\source\repos\CommandLineTest\CommandLineTest\Program.cs : Line 46
Steps to reproduce the bug
Download demo application
Run the demo application and click "Click to Register" button
Elevated requested just approve it (if UAC enabled)
Related data was written into registry
Close the application and press Win + E to activate the application
Visual Studio was requested to debug
See the exception
Don't forget to click "Click to Unregister" to restore the registry after investigation
Expected behavior
AppInstance.GetCurrent() should not threw any exception
@gabbybilka However, packaged application supports Alias which is used to support command line activation. We could set the alias path to registry. That work as expected for me.
Describe the bug
Replace the default settings in Registry at
HKEY_CLASSES_ROOT\Folder\shell\opennewwindow\command
to activate the application though press Win + E.However, app that use Windows App Sdk could not be activated at this situation.
TypeInitializationException
was threw inAppInstance.GetCurrent()
, message:0x80040154 (REGDB_E_CLASSNOTREG)
.Just to mention that activate the application though command line will not raise any exception.
Steps to reproduce the bug
Expected behavior
AppInstance.GetCurrent()
should not threw any exceptionScreenshots
No response
NuGet package version
Windows App SDK 1.2.3: 1.2.230118.102
Packaging type
Packaged (MSIX)
Windows version
Windows 11 version 22H2 (22621, 2022 Update)
IDE
Visual Studio 2022
Additional context
Demo application is in here:
CommandLineTest.zip
The text was updated successfully, but these errors were encountered: