1

Recently I was working with Dapper.Net and it is awesome so far for dynamic object manipulations with sql, Great work by Dapper team.

But there is a need to have bulk insert and update and i used table valued parameter which is better in terms of performance and i decided to use dapper.tvp for that purpose. so i followed following steps

  1. Added Dapper.Tvp assembly using nuget command Install-Package Dapper.Tvp

  2. Then when i try to build the project it gives me the following error "Referenced Assembly Dapper Does Not have a Strong Name"

Please Advice me o this issue and appreciate your help

Husni Jabir
  • 545
  • 1
  • 6
  • 17

2 Answers2

1

Indeed, dapper does not have a strong name. Many of my reasons for this are set out here. You can of course build dapper locally (or as part of your project) and sign it any way you like. Note also that dapper now includes table value parameter support, so it could be that you simply don't need dapper.tvp.

Community
  • 1
  • 1
Marc Gravell
  • 1,026,079
  • 266
  • 2,566
  • 2,900
  • Affecting us with SharePoint feature development. I've always found that signing outside of the producer runs into issues of consistency of signing within an organization. But that's not the responsibility of the Dapper project either. Have to read that long blog post but off the top of my head, not sure why it isn't possible to build one signed and one not. – Richard Collette Sep 26 '14 at 19:04
  • @Richard it is possible, and it is what I have had to do for a number of my other projects. Maybe it is time to do it for this one too. As an aside: dapper can also be used as a single file addition to your project. Then it will be signed automatically as it is part of your project. – Marc Gravell Sep 26 '14 at 19:31
  • Adding the SqlMapper file to the project is exactly what our developers are doing now. You have to be a bit more diligent about looking for updates than you do with Nuget though. I have solutions with 10 nugget packages in them and keeping on top of updates for each of them would be a bit laborious were it not for Nuget. We all used to do it though so it's not a show stopper. – Richard Collette Sep 29 '14 at 11:08
  • 1
    @RichardCollette I suspect there'll be a `Dapper.StrongName` package real soon – Marc Gravell Sep 29 '14 at 11:09
  • 1
    @RichardCollette https://www.nuget.org/packages/Dapper.StrongName - note: I hanve't added rainbow / contrib yet, but will do – Marc Gravell Sep 29 '14 at 11:32
  • I don't want a like button. I want a "You Rock" button. :) Thank you! – Richard Collette Sep 29 '14 at 11:35
0

Okay then follow the below steps that might resolve your problem.

  1. Right click on the project file
  2. Then Select Properties
  3. Then Select "Signing tab" (on the left side)
  4. Then Click the check box "Sign the assembly"
  5. Then Browse your .snk file.

Then rebuild your solution.

good luck...

Krishnraj Rana
  • 6,516
  • 2
  • 29
  • 36
  • Thanks For the suggestion Krishna but cause for this error is not a project in my solution this is because i referenced dapper.tvp and external assembly from nuget and from then on wards this build error raised – Husni Jabir Jul 31 '14 at 14:01