TwoFactorAuth.Net icon indicating copy to clipboard operation
TwoFactorAuth.Net copied to clipboard

Referenced assembly 'TwoFactorAuth.Net.dll' does not have a strong name

Open Qwessie opened this issue 3 years ago • 2 comments

I've tried to install and use this 2FA library using nuget in my solution, but I get the following error when trying any of the classes/methods:

Referenced assembly 'TwoFactorAuth.Net.dll' does not have a strong name

I've checked the dll using sn.exe and indeed it says:

TwoFactorAuth.Net.dll does not represent a strongly named assembly

I have signing turned on in my projects and I don't want to disable it, but I also don't want to have to sign library dll's myself, since it makes updating from nuget more difficult.

Can you help me with this? Thanks in advance!

Qwessie avatar Feb 16 '22 14:02 Qwessie

I'm not sure I see the benefits of strong naming:

For .NET Core and .NET 5+, strong-named assemblies do not provide material benefits. The runtime never validates the strong-name signature, nor does it use the strong-name for assembly binding. source

Over the past, what, 15 years I've been in both camps several times and I still can't make up my mind. Currently I see no real benefits.

RobThree avatar Feb 17 '22 00:02 RobThree

I understand that for newer apps, that use .NET Core or .NET 5+, this might not have any benefits.

However, your library has a minimum of .NET 4.6, and our application uses 4.7.2 and does use strong naming. I cannot migrate to .NET Core or .NET 5+ in a foreseeable future, so I am now unable to use this library?

Qwessie avatar Feb 17 '22 03:02 Qwessie