Specification icon indicating copy to clipboard operation
Specification copied to clipboard

Add Strong-Name version

Open songjiefa opened this issue 2 years ago • 8 comments

I try to reference this package in my wpf(.net 4.8 & .net 6) project which has strong-name , but unfortunately, it throw exception says this assembly need strong-name.

songjiefa avatar Apr 19 '22 01:04 songjiefa

+1 here.

We are trying to reference this project in our MSFT internal application, but it also requires strong name.

LangSensei avatar Aug 05 '22 04:08 LangSensei

Ok I'll try add add strong naming to an upcoming version. I haven't done much with this in the past so I need to figure it out.

ardalis avatar Aug 05 '22 15:08 ardalis

@ardalis

Hi, thanks for the quick feedback.

I was running the internal package publishing tool and hit the following error message:

WARNING: File not StrongName signed: lib\netstandard2.0\Ardalis.Specification.dll ERROR: File not AuthentiCode signed: lib\netstandard2.0\Ardalis.Specification.dll

So, I think the dll needs to be both "StrongName" and "AuthentiCode" signed.

LangSensei avatar Aug 05 '22 15:08 LangSensei

Hi @ardalis

It seems like publishing package with target framework version above netcore, strong name is not required.

Could you please add multi-target to Ardalis.Specification with netstandard2.0 and net6.0?

https://docs.microsoft.com/en-us/dotnet/standard/assembly/strong-named

Quote: 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.

Since adding multi-target shouldn't be that complicated, can we get an ETA on this?

LangSensei avatar Aug 23 '22 06:08 LangSensei

I've done some research into this and looked at what other popular NuGet packages have done, and it looks like having you use StrongNamer (or similar tools) would be better than adding strong names to this package.

https://github.com/jbogard/MediatR/issues/86

ardalis avatar Aug 24 '22 16:08 ardalis

image image image

@ardalis

I think you have looked into a very old thread. According to our internal tool, both MediatR and MediatR.Contracts are strong name signed.

But would you try my another suggestion first? Make Ardalis.Specification multi-targets to both netstandard2.0 and net6.0.

It seems like net6.0 doesn't require the strong name check.

LangSensei avatar Aug 25 '22 12:08 LangSensei

Yes we can certainly do that.

ardalis avatar Aug 25 '22 12:08 ardalis

What's the last status here? Do folks still need this? Should we investigate this issue further? Btw, @LangSensei we have updated the TFMs in the recent versions, now it multi-targets netstandard2.0 and net6.0, so at least you won't have issues with newer projects.

fiseni avatar Jul 22 '23 13:07 fiseni