PDFNet with .NET Core - x64 / Nuget

I have a .NET Core project and I'm trying to target x64.
However, when I build with Visual Studio I always end up with the x86 version of the PDFNet assembly in my bin folder.

Visual Studio 2015 json file contains (among other things):

  "dependencies": {
    "PDFNetNoLoader": "6.5.4",
  },
  "frameworks": {
    "net451": {
    }
  },
  "buildOptions": {
    "platform": "x64"
  },

If I run with the x86 version I naturally get a BadImageFormatException. I have to go into PDFNet's nuget build directory and manually copy the x64 assembly into my bin folder to fix the issue.

Any idea why the x64 version of PDFNet is not automatically copied into my bin?

Thanks,
Martin

The PDFNetLoader is there to help with the AnyCPU configuration.

You can just remove it, and explicitly pick 32 or 64bit.

Note, that there is a setting in Visual Studio .Net projects, under the build tab, where “Prefer 32bit” is usually checked. You should remove this if applicable.

For more about PDFNetLoader, see this post.
https://blog.pdftron.com/2014/09/10/dotnet-pdf-control-nuget/