HidSharp icon indicating copy to clipboard operation
HidSharp copied to clipboard

Strongly-named assembly is required

Open digocesar opened this issue 3 years ago • 2 comments

All assemblies in my project are signed. But when I try to use Nuget's HidSharp component the application is giving the error below at runtime.

Could not load file or assembly 'HidSharp, Version=2.1.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. A strongly-named assembly is required. (Exception from HRESULT: 0x80131044)

Is there a way to publish this library with strong-name or is there a reason not to?

digocesar avatar Oct 01 '21 17:10 digocesar

I'm not sure if this comes even back to the original package... but anyway.

As an OSS maintainer and contributor to multiple C# projects, I want to point out the following:

The need for strongly-named assemblies is disputable, and they bring difficulties which I myself also do not like to handle (keep the sign key separate). There however is a need from other strong named assemblies which need to have this as a dependency, this is not possible if the dependency is not strongly named.

But other projects use them and I acknowledge the need from these others being dependent on my nugets, I handle this with my projects similar to what other projects do, we sign the library but keep the key simply in the repository. This reduces the chance that when I no longer can maintain the project, the whole eco-system might be struck like there was some time with log4net.

It is really only a small action, create a signing key and enable assembly signing. Example here: https://github.com/dapplo/Dapplo.Windows/blob/master/src/Directory.Build.props#L19

Lakritzator avatar Oct 28 '21 13:10 Lakritzator

This repo is just a kind of mirror, and I have no affiliation with the Nuget package owner, I recommend that you follow up on this topic with the original author. https://forum.zer7.com/topic/10108/

benedekkupper avatar Nov 03 '21 15:11 benedekkupper