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

Cannot find type [Microsoft.SqlServer.Replication.ReplicationDatabase]

Could not fin type Microsoft.SqlServer.Replication.ReplicationDatabase after loading Microsoft.SqlServer.Replication.dll.

Repro :
[System.Reflection.Assembly]::LoadFile('C:\Program Files\Microsoft SQL Server\130\SDK\Assemblies\Microsoft.SqlServer.Replication.dll')
$repDB = New-Object Microsoft.SqlServer.Replication.ReplicationDatabase

The file exists and some types and methods are returned :
$asm = [System.Reflection.Assembly]::LoadFile('C:\Program Files\Microsoft SQL Server\130\SDK\Assemblies\Microsoft.SqlServer.Replication.dll')
$asm.GetTypes()

According to https://docs.microsoft.com/en-us/dotnet/api/microsoft.sqlserver.replication.replicationdatabase?view=sqlserver-2016
the class should be there.

Tested on client computer with SSMS 13.0.15900.1 and SSMS 17.9 and also a server with SQL Server 2016 with publisher and distributor role, and SSMS 17.6

Exepected : be able to use the object through SMO / RMO

1 vote
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

    Christophe Laporte shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    0 comments

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

      Feedback and Knowledge Base