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

Need .Net Core 3.0 Prerelease Version #5

Closed
stricq opened this issue Jul 26, 2019 · 10 comments · Fixed by #7
Closed

Need .Net Core 3.0 Prerelease Version #5

stricq opened this issue Jul 26, 2019 · 10 comments · Fixed by #7
Labels
enhancement New feature or request help wanted Extra attention is needed
Milestone

Comments

@stricq
Copy link

stricq commented Jul 26, 2019

Need .Net Core 3.0 Prerelease Version

@augustoproiete augustoproiete added enhancement New feature or request help wanted Extra attention is needed labels Jul 27, 2019
@augustoproiete
Copy link
Member

Thanks @stricq.

.NET Core 3.0 support is definitely a goal. I might start working on this after RTM ships, though, so if pre-release version is something you care about, I'd be happy to get a PR

@cheesi
Copy link

cheesi commented Oct 2, 2019

What is the current state on this issue?

@hillin
Copy link

hillin commented Feb 24, 2020

A mild bump, we are migrating our WPF projects to .NET Core, it would be great if we can migrate the Ookii libs ASAP.

@lklauder
Copy link

I installed the existing framework version in a Core 3.1 project and have a compiler warning about the package having been restored using various framework versions up through 4.8 rather than Core 3.1 and that it may not be fully compatible with my project.
However, it seems to compile and work ok for the following usage:

     var dialog = new Ookii.Dialogs.Wpf.VistaFolderBrowserDialog( );
     dialog.Description = "choose folder in which to store scripts for this project";
     dialog.RootFolder = Environment.SpecialFolder.MyComputer;  // not implemented
     dialog.ShowNewFolderButton = true;
     dialog.UseDescriptionForTitle = true;

     bool result = dialog.ShowDialog( this ).GetValueOrDefault( );

What happens if the Ookii code is pasted into the files of a new Core 3.1 project?
It would be nice to get the RootFolder property implemented in VistaFolderBrowserDialog.

@hillin
Copy link

hillin commented Aug 23, 2020

Using the .NET Framework assembly in a .NET Core project has two consequences:

  1. The project will only run on Windows. Since it's a WPF project and the underlying API this library uses are only available on Windows, this is not a concern;
  2. If the .NET Framework assembly uses some API that does not exist in .NET Core, runtime exception will be thrown. As we've already been using this library in our .NET Core project for a while and none of such exceptions occurred, I guess this is not a problem too.

So in general, if you can bear with the compiler warning, it seems pretty safe to use this library in a .NET Core project. I still hope we can get the .NET Core version though.

@haruby511
Copy link

haruby511 commented Aug 23, 2020

The TaskDialog is not working in .NET Core 3.1. But VistaFolderBrowserDialog and ProgressDialog have not problem.

Below exception thrown from TaskDialog.ShowDialog().

System.EntryPointNotFoundException
Unable to find an entry point named 'TaskDialogIndirect' in DLL 'comctl32.dll'.

I've also tried #7 but same result.

The OS is Windows 10 1909.

Reproduce

  1. Create WPF(.NET Core) project in Visual Studio 2019.
  2. Add below code to .ctor of MainWindow.
TaskDialog taskDialog = new TaskDialog()
{
 WindowTitle = "Title",
 MainIcon = TaskDialogIcon.Information,
 MainInstruction = "test",
 Content = "TEST",
 ExpandedInformation = "detail"
};
taskDialog.Buttons.Add(new TaskDialogButton(ButtonType.Ok));
taskDialog.ShowDialog();
  1. Build and Run.

@FirehawkV21
Copy link
Contributor

@haruby511 I had this issue as well. But it only needs a bit of editing in your project so the library can access the TaskDialog.

  1. Add an app.manifest.
  2. Open the manifest file. You'll see this bit:
  <dependency>
    <dependentAssembly>
      <assemblyIdentity
          type="win32"
          name="Microsoft.Windows.Common-Controls"
          version="6.0.0.0"
          processorArchitecture="*"
          publicKeyToken="6595b64144ccf1df"
          language="*"
        />
    </dependentAssembly>
  </dependency>

Uncomment this.
4. Right-click on the project and click properties.
5. In the "Application" tab, pick the manifest file from the list.

That should fix the issue.

@augustoproiete
Copy link
Member

GitHub automatically closed this issue with the merge of PR #7, so I'm re-opening. I'm planning on releasing a pre-release package over the coming weekend.

@augustoproiete
Copy link
Member

Ookii.Dialogs.Wpf 2.0.0-preview1 has been published on nuget.org

Install-Package Ookii.Dialogs.Wpf -Version 2.0.0-preview1

Please test in your apps and report any issues you find.


Thanks to @acemod13 for doing all the work!

@augustoproiete
Copy link
Member

augustoproiete commented Nov 15, 2020

Stable version with .NET 3.1 support has been published to nuget.org: Ookii.Dialogs.Wpf 2.0.0

Install-Package Ookii.Dialogs.Wpf -Version 2.0.0

N.B.: WPF apps on .NET Core 3.1 need to declare an application manifest in order to use Ookii Dialogs. The manifest was added automatically in .NET Framework apps, but with .NET Core 3.1 this is no longer the case, so there's a little extra step that the developer needs to do. More details on the README of this repo.


Thanks again to @acemod13 for the contribution!
/cc @stricq @cheesi @lklauder @hillin @haruby511 @vpenades @Agagamand @NateTheGreat714 @andreasgrosche

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Development

Successfully merging a pull request may close this issue.

7 participants