0

I added VNext class library to ASp.Net 5 project, and I'm trying to add Nuget package "Npsql":

enter image description here

But it can't compile, what I'm doing wrong?

Andrey
  • 311
  • 2
  • 8
  • 29

1 Answers1

1

The problem is that when you add the dependency to all TFMs (dnx451 and dnxcore50). Mostly sure, Npgsql doesn't support dnxcore50 (CoreCLR).

You have 3 solutions:

  1. Remove dnxcore50 completely
  2. Move the dependency under dnx451
  3. Use #if DNX451 conditional compilation blocks in your code
Victor Hurdugaci
  • 28,177
  • 5
  • 87
  • 103