1

I am learning dapper ORM. While installing it through nuget package manager I am getting following error:

Could not install package 'Dapper 2.0.30'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

In target framework option in project properties I've changed .net framework from 2.0 to 4.5.1

James Z
  • 12,209
  • 10
  • 24
  • 44
Amit Kaushal
  • 429
  • 1
  • 9
  • 25

3 Answers3

3

No 2.* (or above) version of Dapper supports .NET 4.5.*, and there are no plans to do so. You will have to update your target framework, or stick with older versions of the tool. Preferably the first.

Ultimately you should expect this to be more and more of a problem if you choose to use old frameworks.

Marc Gravell
  • 1,026,079
  • 266
  • 2,566
  • 2,900
1

Here's what I saw:

  • Dapper 1.60.1 needs .NET 4.5.1

  • Dapper 1.50.4 needs .NET 4.5.1

  • Dapper 1.50.2 needs .NET 4.0

Therefore, having .NET 4.5, I installed Dapper 1.50.2

Jesus is Lord
  • 14,971
  • 11
  • 66
  • 97
0

dapper 2.0.30 of supports only .NET Framework 4.6.1 and .NET Standard 2.0

the max version that supports .NET Framework 4.5 is dapper 1.50.2

More informations can be found on the official nuget link: https://www.nuget.org/packages/Dapper/1.50.2#dependencies-tab

KARIM Yassine
  • 143
  • 1
  • 11