10

I installed dapper from NuGet. When I try to compile the code I'm getting the error

Referenced assembly Dapper does not have a strong name

What causes this?

Nate Barbettini
  • 51,256
  • 26
  • 134
  • 147
Dharani thulasi
  • 103
  • 1
  • 5

1 Answers1

17

You see the error because the package you use doesn't have a strong name, that is it doesn't use signing.

Signing ensures the authenticity of an assembly. See Anything wrong with NOT signing a .NET assembly? for more information about the reasons assemblies should (or should not) be signed.

If an assembly is not signed, it cannot be used in an assembly which is.

You may either deactivate signing in the assembly which uses Dapper, but I wouldn't recommend that. Instead, you may use the Dapper.StrongName package instead.

Community
  • 1
  • 1
Arseni Mourzenko
  • 50,338
  • 35
  • 112
  • 199