"version" incorrectly showing as 0.0.0.0 in sys.assemblies and ASSEMBLYPROPERTY(name, 'CLRName') for unsigned SQLCLR Assemblies
If you set the AssemblyVersion (e.g. [assembly: AssemblyVersion("1.2.3.4")] ) of a SQLCLR Assembly but do not sign the Assembly / give it a Strong Name, then the "version" info in the [clr_name] field of the [sys].[assemblies] catalog view will show "0.0.0.0". It will only show the actual AssemblyVersion if the Assembly is signed. However, the AssemblyVersion info shows correctly everywhere else.
I just checked the definition of [sys].[assemblies] and found that the [clr_name] field is merely the output of the following built-in function, which is then technically the true source of the problem:
ASSEMBLYPROPERTY(name, 'CLRName')
I have tested this in the following versions of SQL Server:
2005, SP4
2008 R2, SP3
2012, SP3
2014, SP1
2016, SP1
2017 RC2 (Linux)

Upvotes: 1
1 comment
-
Solomon Rutzky commented