Robmaister / SharpFont

Cross-platform FreeType bindings for .NET - Need maintainer
Other
286 stars 104 forks source link

SharpFont NuGet package version issue #90

Closed dterracino closed 7 years ago

dterracino commented 7 years ago

I've tried using your SharpFont libraries (I'm currently working with SharpFont.HarfBuzz), but I'm having a versioning issue with the SharpFont DLL. Although this is related to SharpFont.HarfBuzz as well, the issue seems to stem from SharpFont, so I posted the issue in this repo.

The steps I took to create the (latest) test project are:

  1. Create .NET 4.0 project
  2. Install-Package SharpFont.Dependencies
  3. Install-Package SharpFont
  4. Install-Package SharpFont.HarfBuzz

I then took the code from your HarfBuzz Example project and pasted it into my own project. The most important error I get is this one:

Assembly 'SharpFont.HarfBuzz' with identity 'SharpFont.HarfBuzz, Version=0.1.0.0, Culture=neutral, PublicKeyToken=7f22260154a89e6f' uses 'SharpFont, Version=3.1.0.200, Culture=neutral, PublicKeyToken=48add4c483071cdf' which has a higher version than referenced assembly 'SharpFont' with identity 'SharpFont, Version=3.0.1.200, Culture=neutral, PublicKeyToken=48add4c483071cdf'

I've pulled down the SharpFont 3.1.0 package from NuGet, and although the DLL is different than the 3.0.1 version DLL, the version numbers in the DLL are both the same (here is a screenshot of the properties of both DLLs):

image

Obviously, this is causing issues with bindings to other libraries, but it also looks like the DLL in the v3.1.0 SharpFont package is marked incorrectly. I'm going to just try to clone all 3 repos and rebuild them myself, and see if I can get them working correctly, but I wanted to let you know of the issue in the NuGet package.

Additionally, it looks like these libraries are compiled for .NET Framework 4.0? NuGet complains when I try to include them in v4.5.1 or v4.6.1 projects. I wish there was an easier way to know what versions the packages on NuGet are targeted to - if anyone has any suggestions, please let me know. :)

Robmaister commented 7 years ago

The next version, which supports a lot more platforms, moved to 4.5. Just need to package and publish a new version (aiming on finding the time for that this weekend).

Also note that SharpFont.Harfbuzz is very much in early development. I'll publish a new version that uses the latest SharpFont version with the new SharpFont release.

dterracino commented 7 years ago

That all sounds great! I look forward to the next release.

The most important thing I think I wanted to report here is that the SharpFont 3.1.0 NuGet package actually contains the SharpFont 3.0.1 DLL.

Robmaister commented 7 years ago

Yes, I'm pretty sure you can't actually upload a new package over an old version, so it may be stuck that way and the best way forward is to just publish a new version...

The only exception to that I've found is for a product called Octopus Deploy, which allows you to replace old published packages by appending ?replace=true to the Source URL. I'm not sure if this will work with normal NuGet, but will give it a shot soon http://docs.octopusdeploy.com/display/OD/Push+a+NuGet+package+that+already+exists

dterracino commented 7 years ago

Sounds good. I'll compile the libraries locally and watch for the next NuGet packages. Thanks!

feliwir commented 7 years ago

Will there be .NET core support any time soon?

Robmaister commented 7 years ago

Eventually, I haven't paid much attention to it, but from what I can tell it should be largely compatible. As I understand it there's a new project format, project.json, which is getting replaced with a modified .csproj, so I'd rather wait for that transition to be done before putting any real effort into it.

Thraka commented 7 years ago

I think the NuGet package is still waiting for an update. Thanks

UPDATE Actually I think my problem is different from this.. sorry. I added the the latest nuget on a 4.5 project and it refuses to install saying there isn't a binary compatible.

UPDATE OK I know what is going on now. The sharpfont.dependencies nuget package does not have a binary for .NET so it says there is nothing there and refuses to add the package to the project, which then causes SharpFont to not be added\updated.

Robmaister commented 7 years ago

4.0.0 released, including new iOS and PCL packages. Should be compatible with 4.5+. The mistake I made in not updating the binary version can't be fixed without making a huge mess (modifying history) or being confusing (NuGet binaries for v3.1.0 being different than git binaries for v3.1.0.

I believe this should just be considered a known issue of 3.1.0 and left there. In the future I'll do some automation to prevent an issue like this from happening again.

If you run into any issues with the 4.0.0 package, please open another issue.

Robmaister commented 7 years ago

Oh yes and @feliwir I believe 4.0.0 Portable should support .NET Core, though I haven't personally tested it.

Robmaister commented 7 years ago

Unlisted 4.0.0 and published 4.0.1, forgot to update profiles in the nuspec files.