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
I followed the sample from Ookii.Dialogs.Wpf.Sample for instantiating a TaskDialog in a .NET Core 3.1 Application.
TaskDialogdialog=newTaskDialog();dialog.WindowTitle="Task dialog sample";dialog.MainInstruction="This is an example task dialog.";dialog.Content="Task dialogs are a more flexible type of message box. Among other things, task dialogs support custom buttons, command links, scroll bars, expandable sections, radio buttons, a check box (useful for e.g. \"don't show this again\"), custom icons, and a footer. Some of those things are demonstrated here.";dialog.ExpandedInformation="Ookii.org's Task Dialog doesn't just provide a wrapper for the native Task Dialog API; it is designed to provide a programming interface that is natural to .Net developers.";dialog.Footer="Task Dialogs support footers and can even include <a href=\"http://www.ookii.org\">hyperlinks</a>.";dialog.FooterIcon=TaskDialogIcon.Information;dialog.EnableHyperlinks=true;dialog.Buttons.Add(newTaskDialogButton("A custom button"));dialog.ShowDialog(this);
The dialog fails to open and throws the following exception:
Loaded 'C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\3.1.9\System.Drawing.Common.dll'. Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.Exception thrown: 'System.EntryPointNotFoundException' in Ookii.Dialogs.Wpf.dll
Not sure whether it helps but by commenting out line-by-line I could pinpoint the root of the cause to TaskDialogButton.
The text was updated successfully, but these errors were encountered:
Thanks for reporting this @Pogodaanton. I can reproduce the error you're seeing and I'll update the documentation with the information below.
The internal error message is
System.EntryPointNotFoundException: 'Unable to find an entry point named 'TaskDialogIndirect' in DLL 'comctl32.dll'.'
To resolve this error, you'll need to add an application manifest to your .NET Core 3.1 WPF App in order to specify that your app has a dependency on comctl32.dll.
Right click your project in Visual Studio -> Add -> New Item... and select "Application Manifest File (Windows Only)"
That will create a template that you can customize and delete the parts you don't want and/or uncomment the parts that you want. The crucial part is the dependentAssembly entry with the reference to Microsoft.Windows.Common-Controls
<?xml version="1.0" encoding="utf-8"?>
<assemblymanifestVersion="1.0"xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentityversion="1.0.0.0"name="MyApplication.app"/>
<trustInfoxmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivilegesxmlns="urn:schemas-microsoft-com:asm.v3">
<requestedExecutionLevellevel="asInvoker"uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
<!-- Enable themes for Windows common controls and dialogs (Windows XP and later) -->
<dependency>
<dependentAssembly>
<assemblyIdentitytype="win32"name="Microsoft.Windows.Common-Controls"version="6.0.0.0"processorArchitecture="*"publicKeyToken="6595b64144ccf1df"language="*"
/>
</dependentAssembly>
</dependency>
</assembly>
Please, let me know if this works for you and if you find any other issue.
I followed the sample from Ookii.Dialogs.Wpf.Sample for instantiating a TaskDialog in a .NET Core 3.1 Application.
The dialog fails to open and throws the following exception:
Not sure whether it helps but by commenting out line-by-line I could pinpoint the root of the cause to
TaskDialogButton
.The text was updated successfully, but these errors were encountered: