lkosson / reportviewercore

Recompilation of Microsoft.ReportViewer for .NET Core 3.1+
408 stars 119 forks source link

Strong naming? #185

Closed Mek7 closed 3 months ago

Mek7 commented 3 months ago

Can you please publish a strongly named version of this library? It would help people like me, who have strongly named code base, so only strongly named 3rd party libraries can be referenced. No impact on other people - it just broadens the usability of this library. Thank you.

lkosson commented 3 months ago

.NET Core does not care about/use strong names as .NET Framework did.

Mek7 commented 3 months ago

I have a .NET 8 project that uses the Microsoft.NET.Sdk.Web SDK. This project is strongly named. I get a build warning: Referenced assembly 'Microsoft.ReportViewer.NETCore, Version=15.1.20.0, Culture=neutral, PublicKeyToken=null' does not have a strong name. If .NET Core doesn't care, then why is that?

lkosson commented 3 months ago

As per Microsoft docs:

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.

However, in other places [1][2] they indeed recommend strong-naming publicly available libraries, specifically due to warning CS8002.

I'll add strong name in next release.

Mek7 commented 3 months ago

Perfect, thank you!

lkosson commented 3 months ago

Signed version 15.1.21.0 is now available on nuget.