Build errors when adding SQL Server 2025 (v17) support

Abhishek Modi (amodi) 20 Reputation points

Hi Team,

I am updating a project to add support for SQL Server 2025 (V17.x), but I am encountering the following build errors:

  • error CS0234: The type or namespace name 'Smo' does not exist in the namespace 'Microsoft.SqlServer.Management' (are you missing an assembly reference?)
  • error CS0012: The type 'Microsoft.SqlServer.Dts.Runtime.Wrapper.IDTSExecuteOnProxy140' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.SqlServer.DTSRuntimeWrap, Version=17.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91'.

Could you provide guidance?

Thanks,

Abhishek

0 comments No comments

Sign in to comment

Answer recommended by moderator

Akhil Gajavelly 1,830 Reputation points Microsoft External Staff Moderator

Hi @Abhishek Modi (amodi) ,

You’re referencing the wrong binaries.

The path C:\Program Files\Microsoft SQL Server Management Studio 21\Release\Common7 contains SSMS UI / design-time assemblies, not the SDK/runtime assemblies required for compilation. This is why Microsoft.SqlServer.Management and Microsoft.SqlServer.Dts namespaces are missing.

Try the bellow steps, For SQL Server 2025, you must reference SDK assemblies, not SSMS ones.

  1. Remove all references added from SSMS 21 path (including ManagedDTS, Dts.Design, MaintenancePlanTasks these are design-time only)
  2. Add references ONLY from this path:
  3. C:\Program Files\Microsoft SQL Server\170\SDK\Assemblies\
  4. Required assemblies
    • Microsoft.SqlServer.Management.Smo.dll
      • Microsoft.SqlServer.Management.Common.dll
        • Microsoft.SqlServer.Management.Sdk.Sfc.dll
          • Microsoft.SqlServer.DTSRuntimeWrap.dll
            • Microsoft.SqlServer.ManagedDTS.dll
            1. Set Copy Local = False
            2. Delete bin / obj → Rebuild

Final note:

  • SSMS 21 ≠ SQL Server SDK
  • SSMS assemblies will always fail at build time
  • SDK assemblies under \170\SDK\Assemblies\ are mandatory

If the SDK folder is missing, rerun SQL Server 2025 setup and install Client Tools SDK.

Thanks,
Akhil.

0 comments No comments

Sign in to comment

2 additional answers

  1. Akhil Gajavelly 1,830 Reputation points Microsoft External Staff Moderator

    Hi @Abhishek Modi (amodi) ,

    For SQL Server 2025, SMO and SSIS v17 assemblies are NOT available via NuGet yet.

    What actually fixes the build

    1. Install SQL Server 2025 client tools / SSMS (v17) on the build machine
    2. Manually add references from:
    3. C:\Program Files\Microsoft SQL Server\170\SDK\Assemblies\
      • Microsoft.SqlServer.Management.Smo.dll
        • Microsoft.SqlServer.DTSRuntimeWrap.dll
        1. Set Copy Local = False
        2. Clean (bin/obj) and rebuild

    If this still fails. You cannot build without SQL tools installed. Until Microsoft ships SMO/DTS v17 NuGet packages, stay on v16 (SQL Server 2022).

    This is a tooling limitation, not a code issue.

    Thanks,
    Akhil.

    1. Abhishek Modi (amodi) 20 Reputation points

      Hi @Akhil Gajavelly ,

      I have already installed SQL Server 2025 and referencing below dll from path - "C:\Program Files\Microsoft SQL Server Management Studio 21\Release\Common7" to add SQL Server Support 2025 (V17.x) support -

      • Microsoft.SqlServer.ConnectionInfo.dll‎
      • Microsoft.SqlServer.Dts.Design.dll
      • Microsoft.SqlServer.MaintenancePlanTasks.dll‎
      • Microsoft.SqlServer.ManagedDTS.dll
      • Microsoft.SqlServer.Management.Sdk.Sfc.dll‎
      • Microsoft.SqlServer.SQLTask.dll‎
      • Microsoft.SqlServer.Smo.dll‎
      • Microsoft.SqlServer.SqlEnum.dll

      Facing following error while build -

      1. error CS0234: The type or namespace name 'Management' does not exist in the namespace 'Microsoft.SqlServer' (are you missing an assembly reference?)
      2. error CS0234: The type or namespace name 'Dts' does not exist in the namespace 'Microsoft.SqlServer' (are you missing an assembly reference?)

      Guidance will be help to proceed further?

      Thanks,

      Abhishek Modi

    2. Akhil Gajavelly 1,830 Reputation points Microsoft External Staff Moderator

      Hi @Abhishek Modi (amodi) ,

      Just checking in were you able to switch the references to the SDK path (...\170\SDK\Assemblies\) and rebuild?

      That should resolve the missing namespaces issue. If it’s still failing, please share the exact error message and confirm whether the Client Tools SDK is installed.

      Thanks,
      Akhil.


    Sign in to comment
  2. AI answer

    To resolve the build errors you're encountering while adding support for SQL Server 2025 (V17.x), you should consider the following steps:

    1. Add Missing References: The errors indicate that certain assemblies are not referenced in your project. Specifically, you need to add references to:
      • Microsoft.SqlServer.Management.Smo for the Smo namespace.
      • Microsoft.SqlServer.DTSRuntimeWrap for the IDTSExecuteOnProxy140 type.
      Ensure that you have the correct version of these assemblies (Version=17.0.0.0) referenced in your project. You can do this by checking your project's references and adding them if they are missing.
    2. Update Project SDK: If you are using features that were recently added in SQL Server 2025, make sure your project SDK version is updated accordingly. This may resolve compatibility issues with the namespaces and types.
    3. Rebuild the Project: After adding the necessary references, perform a clean build of your project to ensure that all changes take effect. You can delete the /bin and /obj folders before rebuilding to clear any cached data.
    4. Check for Additional Dependencies: If you are using any specific features or components from SQL Server Integration Services (SSIS), ensure that all related dependencies are also included in your project.

    By following these steps, you should be able to resolve the build errors and successfully add support for SQL Server 2025 in your project.


    References:

    AI-generated content may be incorrect. Read our transparency notes for more information.
Sign in to answer

Your answer