Build errors while adding SQL Server 2025 (Version - 17.x)

Abhishek Modi (amodi) 20 Reputation points

Hi Team,

I have installed SQL Server 2025 (Version 17.0.1000.7), and I am updating a project to add support for SQL Server 2025. For this, I need two processor architecture MSIL assemblies: Microsoft.SqlServer.Smo.dll and Microsoft.SqlServer.SqlEnum.dll, with versions greater than or equal to 17.0.1000.7.

However, the highest version I am able to find on in "C:\Windows\Microsoft.NET\assembly\GAC_MSIL" is 17.0.74.0, which is lower than what is required. As a result, I am getting the following build errors:

Code

  • error CS1705: Assembly 'Microsoft.SqlServer.MaintenancePlanTasks, Version=17.0.0.0, Culture=neutral' uses 'Microsoft.SqlServer.Smo, Version=17.100.0.0, Culture=neutral' which has a higher version than referenced assembly 'Microsoft.SqlServer.Smo, Version=17.0.0.0, Culture=neutral'
  • error CS1705: Assembly 'Microsoft.SqlServer.MaintenancePlanTasks, Version=17.0.0.0, Culture=neutral' uses 'Microsoft.SqlServer.SqlEnum, Version=17.100.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' which has a higher version than referenced assembly 'Microsoft.SqlServer.SqlEnum, Version=17.0.0.0, Culture=neutral'

Could you please provide guidance?

Can you please advise where I can obtain the required versions (17.100.0.0 or higher) of Microsoft.SqlServer.Smo.dll and Microsoft.SqlServer.SqlEnum.dll for SQL Server 2025 in processor architecture GAC MSIL (i.e. - in "C:\Windows\Microsoft.NET\assembly\GAC_MSIL" )?

Thank you in advance for your help!

Thanks,

Abhishek

  1. Abhishek Modi (amodi) 20 Reputation points

    Hi @Shruti Dhruv ,

    Is there any tentative timeline for when GAC‑based DLLs will be available?

    Any update or guidance on this would be greatly appreciated.

    Thanks,

    Abhishek


Sign in to comment

Answer recommended by moderator

Shruti Dhruv 875 Reputation points Microsoft External Staff Moderator

Hi Abhishek,

Welcome to Microsoft Q&A Forum!

As per official document, Microsoft recommends developers use the Microsoft.SqlServer.SqlManagementObjects NuGet package instead of relying on MSIL GAC assemblies. It includes:

  • SMO assemblies (Smo.dll, SqlEnum.dll, etc.)
  • Versioning aligned to SQL Server compatibility
  • Strong-named and Authenticode signed DLLs

Refer- https://learn.microsoft.com/en-us/sql/relational-databases/server-management-objects-smo/installing-smo?view=sql-server-ver17

Latest AvailableVersion:
https://www.nuget.org/packages/Microsoft.SqlServer.SqlManagementObjects

It targets version 18.x, which may include newer functionality than SQL Server 2025, but is fully compatible.
If GAC-based deployment is mandatory, wait for SQL Server 2025 Feature Pack or SharedManagementObjects.msi, which will install v17.100+ assemblies and avoid mixing GAC and NuGet references—they will cause version conflict and build errors.

Hope this helps!
Regards,
Shruti

  1. Abhishek Modi (amodi) 20 Reputation points

    Hi @Shruti Dhruv ,

    Is there any tentative timeline for when GAC‑based DLLs will be available?

    Any update or guidance on this would be greatly appreciated.

    Thanks,

    Abhishek

  2. Shruti Dhruv 875 Reputation points Microsoft External Staff Moderator

    Hi Abhishek,

    There is currently tentative timeline for when GAC‑installed SMO assemblies for SQL Server 2025 will be available.
    For now you may use

    Microsoft.SqlServer.SqlManagementObjects (NuGet)

    This gives you versions newer than 17.100.0.0 and avoids CS1705 reference conflicts.

    Hope this helps!

  3. Abhishek Modi (amodi) 20 Reputation points

    Hi @Shruti Dhruv ,

    I think you mean to update tentative timeline but you're not mentioned in your last comment. May be missed. or like you mean to say - It will be available?

    Thanks for the your support !

    Thanks,

    Abhishek

  4. Shruti Dhruv 875 Reputation points Microsoft External Staff Moderator

    Hi Abhishek,

    I meant to say, there is currently no tentative timeline available for this.
    My bad! It was a typing error.
    I hope that clears some air.

    Thank you
    Shruti


Sign in to comment

0 additional answers

Sign in to answer

Your answer