Do you have a comment or suggestion to improve SQL Server? We’d love to hear it!

"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)

2 votes
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    Signed in as (Sign out)

    We’ll send you updates on this idea

    AdminMicrosoft SQL Server (Admin, Microsoft Azure) shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    1 comment

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      Submitting...

      Feedback and Knowledge Base