forked from aybe/Windows-API-Code-Pack-1.1
-
Notifications
You must be signed in to change notification settings - Fork 45
Open
Description
The reason is that for self-contained apps Assembly.Location is empty here (https://learn.microsoft.com/en-us/dotnet/core/deploying/single-file/overview?tabs=cli#api-incompatibility):
Windows-API-Code-Pack-1.1/source/WindowsAPICodePack/Core/Interop/TaskDialogs/EnableThemingInScope.cs
Line 86 in 5f00f7c
| assemblyLoc = typeof(object).Assembly.Location; |
CoreCLR Version: 6.0.2123.36311
.NET Version: 6.0.21
Description: The process was terminated due to an unhandled exception.
Exception Info: System.ArgumentNullException: Value cannot be null. (Parameter 'path1')
at System.IO.Path.Combine(String path1, String path2)
at Microsoft.WindowsAPICodePack.Dialogs.EnableThemingInScope.EnsureActivateContextCreated()
at Microsoft.WindowsAPICodePack.Dialogs.EnableThemingInScope..ctor(Boolean enable)
at Microsoft.WindowsAPICodePack.Dialogs.NativeTaskDialog.NativeShow()
at Microsoft.WindowsAPICodePack.Dialogs.TaskDialog.ShowCore()
In the same Microsoft doc it is recommended to use AppContext.BaseDirectory instead of Assembly.Location for such cases.
Metadata
Metadata
Assignees
Labels
No labels