jingwood / d2dlib

A .NET library for hardware-accelerated, high performance, immediate mode rendering via Direct2D.
MIT License
234 stars 40 forks source link

Fix consumption of package for .NET Core and .NET 5 #39

Closed drewnoakes closed 3 years ago

drewnoakes commented 3 years ago

Fixes #38

netcore is not a valid targetFramework value, so was being ignored by NuGet during package resolve.

Using netstandard1.0 instead will ensure the package's files are referenced by the project correctly in .NET Core and .NET 5 projects.


I packed the package locally to test and verified the fix for both netcoreapp3.1 and net5.0-windows projects.

drewnoakes commented 3 years ago
      "unvell.D2DLib/1.2.4": {
        "type": "package",
        "compile": {
          "lib/netstandard1.0/d2dlibexport.dll": {},
          "lib/netstandard1.0/d2dwinform.dll": {}
        },
        "runtime": {
          "lib/netstandard1.0/d2dlibexport.dll": {},
          "lib/netstandard1.0/d2dwinform.dll": {}
        },
        "build": {
          "build/unvell.D2DLib.targets": {}
        }
      },

image

drewnoakes commented 3 years ago

Now that I try to run the project that consumes this package, I'm hitting runtime exceptions about the image format. It's late here, but I will look again soon. This PR is still ok, from what I know so far. There may just be more work to do.

jingwood commented 3 years ago

@drewnoakes Thanks very much!