Deffiss / testenvironment-docker

MIT License
117 stars 30 forks source link

Is it possible to have strong name assembly #15

Closed vhatsura closed 4 years ago

vhatsura commented 4 years ago

Hey, @Deffiss.

Thanks a lot for such a great library. I was in DotNext in 2018 in Moscow and saw your presentation. It was awesome.

So, I'm using TestEnvironment.Docker package in a few projects and faced with an issue in one of the projects. Such a project has strong naming and has two targets: net461 and netcoreapp2.2. Unfortunately, TestEnvironment.Docker package cannot be used in net461 due to it isn't strong-named assembly:

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

Also, the fresh guide from Microsoft about open-source libraries suggests signing libraries. It would be very nice if you can do it.

jzabroski commented 4 years ago

@vhatsura Use the StrongNamer package instead, maintained by Daniel Plaisted of the Microsoft SDK team. There is no need for TestEnvironment.Docker to start strong naming things.

vhatsura commented 4 years ago

@jzabroski, didn't know about another great library. Thanks a lot. I will add it to my bookmarks.

jzabroski commented 4 years ago

Basically, the open source guidance is a bit misguided and not in-sync with reality. In an ideal world, open source projects would Authenticode their Nuget Packages, but nobody does that because it costs money to have a server up to store secrets to sign nuget packages. So, what one person at Microsoft might write as a best practice is a far cry from what we normally think of as a "best practice" in the ".NET Framework Design Guidelines" sense of "end base classes with Base" that are easy to follow.

Anyway, StrongNamer works - I used it to sign a bunch of Excel COM Add-ins recently on a massive project where I had to sign about 50 projects.