alefranz / MELT

MELT is a free, open source, testing library for the .NET Standard Microsoft Extensions Logging library. It is a solution to easily test logs.
Apache License 2.0
72 stars 5 forks source link

Strong naming? #30

Closed gkinsman closed 3 years ago

gkinsman commented 3 years ago

Hi there!

Given that the .NET OSS guidance advises strong naming, many OSS libraries have chosen to go down this route. This library is super useful for testing those libraries, but unfortunately can't be used as it isn't strong named.

https://docs.microsoft.com/en-us/dotnet/standard/library-guidance/strong-naming

It would be awesome if this library could be used in these scenarios by strong naming it.

alefranz commented 3 years ago

Hi George,

I wasn't expecting strong naming to be named for a testing library, but if that helps you, I can look into it.

What would be an example where this helps? Are you in an environment where you must use strong naming for test projects?

gkinsman commented 3 years ago

Hi Alessio!

Due to the nature of strong naming being viral, it's not possible to reference a non-strong named library from a strong named one. Our library also references the test library in an InternalVisibleTo attribute, which as a strong named assembly requires a full name with a public key.

I suspect this is a reasonably common pattern with test libraries, what do you think?

Thanks for your quick response!

alefranz commented 3 years ago

ah gothca! I didn't think about InternalVisibleTo.

I'll investigate the easiest way to set it up in GitHub Actions

clairernovotny commented 3 years ago

You should just check in the snk file without a password. Strong names are not a security feature.

https://docs.microsoft.com/en-us/dotnet/standard/library-guidance/strong-naming

alefranz commented 3 years ago

Released as 0.8.0, should be on NuGet shortly.

Thanks for requesting this and let me know in case of any issue.

gkinsman commented 3 years ago

Thanks so much Alessio!