ArtifexSoftware / Ghostscript.NET

Ghostscript.NET - managed wrapper around the Ghostscript library (32-bit & 64-bit)
https://ghostscript.com
GNU Affero General Public License v3.0
391 stars 152 forks source link

Added .NET Core Support - Stale #89

Closed porrey closed 1 year ago

porrey commented 3 years ago

I am using this library in a .NET 5.0 application. I am sharing my changes back as a pull request in case you are interested in updating the library for Core. The NuGet package built will build versions for multiple frameworks.

Changes:

  1. Converted the main library project format to an SDK project and added support for the following frameworks: netstandard2.1, netcoreapp3.1, net5.0, net4, net461, net47, net471 and net472

  2. Added NuGet package and migrated the settings from previous NuGet package.

  3. Added support for Win32 registry. Note this portion of the library will only work on the Windows platform. Warnings are generated when compiling.

  4. Changed version to 1.3.0 (this can be reset to any desired version).

  5. Added package icon to project. NuGet now packages the icon within the package file.

  6. Corrected a few spelling issues.

Note that no code changes were required at this point. I ran some test in a .NET 5.0 application, but did not run extension tests.

I recommend adding -beta.1 to the version and publishing the NuGet package to allow developers the ability to test the package without needing to upgrade exiting production applications.

paulovila commented 3 years ago

Is would be great if there was support for net5, the nuget package should include both targets, (or else be pure netStandard)

AsierVillanueva commented 3 years ago

I have generated the package locally and works fine with .net 5. I'm using it to convert pdfs to images.

ssougnez commented 2 years ago

Hello,

can this PR be considered please?

Thanks

porrey commented 2 years ago

I have added NET 6 support to this branch and a VS2022 solution file.

jhwt-103 commented 2 years ago

Is there any reason this couldn't be completed?

PatrykSzwer commented 2 years ago

Is there any way to use this version of library under linux? I'm still getting:

Unable to load shared library 'kernel32.dll' or one of its dependencies

😢

porrey commented 2 years ago

Is there any way to use this version of library under linux? I'm still getting:

Unable to load shared library 'kernel32.dll' or one of its dependencies

😢

There are several calls being made that are specific to Windows:

Screen Shot 2022-05-18 at 6 24 25 AM
bartecargo commented 1 year ago

@porrey thanks for writing this PR. Would it be possible for you to publish your fork to NuGet, since it seems unlikely that the original project will merge this PR?

porrey commented 1 year ago

@porrey thanks for writing this PR. Would it be possible for you to publish your fork to NuGet, since it seems unlikely that the original project will merge this PR?

I can do that. I will publish it as Ghostscript.Core.

porrey commented 1 year ago

Published branch with new package ID as Ghostscript.Core 1.5.0-preview-1.0.0. If the owner of this repo merges the changes later I can deprecate the new package. The namespace is still Ghostscript.NET to eliminate code changes.

Please note that this pull request is no longer valid. I have added support for .NET 7 in my branch.

https://github.com/porrey/Ghostscript.NET