0

I am trying to integrate with Twilio to send text messages from our application. I did the nuget install as instructed on their site. When I attempt to run anything that references the dll, I'm getting this message:

enter image description here

enter image description here

I unchecked the Sign the Assembly in the project and that fixed this but I don't have the liberty of changing the project file.

enter image description here

How do I get around this without having to uncheck this option?

ErocM
  • 4,505
  • 24
  • 94
  • 161
  • 1
    As far as I know, if you want to reference the library directly (and not through another proxy/wrapper) the only thing you can do is compile a signed version [of the source code](https://github.com/twilio/twilio-csharp) yourself. – Visual Vincent Nov 01 '19 at 18:49
  • @VisualVincentty for the info, I'm trying that now. – ErocM Nov 01 '19 at 19:11
  • @VisualVincent that worked perfectly after a few adjustments. If you want to put that as an answer, I will give you an upvote! – ErocM Nov 01 '19 at 19:24

1 Answers1

2

If you want to reference the library directly (not through another proxy/wrapper) the easiest fix in this scenario would be to download the source code and compile a signed version yourself.

However, I stumbled upon this interesting article: .NET-Fu: Zero Delay Signing Of An Unsigned Assembly, and contrary to my initial comment, it seems you can actually sign an already compiled DLL by first decompiling it into IL and then recompiling it, signing it in the process. Microsoft even provides you with tools that can be used to do so, namely ildasm for decompilation and ilasm for re-compilation.

Visual Vincent
  • 18,045
  • 5
  • 28
  • 75