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

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

Merged
merged 2 commits into from Dec 11, 2020

Conversation

drewnoakes
Copy link
Collaborator

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.

Fixes jingwood#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.
@drewnoakes
Copy link
Collaborator Author

      "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
Copy link
Collaborator Author

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 jingwood merged commit f4b13c9 into jingwood:master Dec 11, 2020
@jingwood
Copy link
Owner

@drewnoakes Thanks very much!

@drewnoakes drewnoakes deleted the fix-package-for-netcore branch December 12, 2020 02:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Package doesn't appear to work under .NET Core or .NET 5
2 participants