BlueBarren BlueBarren - 1 month ago 32x
C# Question

Finding Microsoft.SqlServer.Management.Smo and ConnectionInfo References that are Compatible

I'm trying to use

using Microsoft.SqlServer.Management.Common
using Microsoft.SqlServer.Management.Smo

And I successfully found the .dll files on my C: drive in the usual place,

C:\Program Files\Microsoft SQL Server\

The problem is that apparently the two aren't compatible.

comes from


comes from referencing the

so I wonder since they're not in the same
that's why they aren't the same version. When I run the application I get this message from Visual Studio

"Found conflicts between different versions of the same dependent assembly that could not be resolved. These reference conflicts are listed in the build log when log verbosity is set to detailed."


"Assembly 'Microsoft.SqlServer.Smo, Version=, Culture=neutral, PublicKeyToken=89845dcd8080cc91' uses 'Microsoft.SqlServer.ConnectionInfo, Version=, Culture=neutral, PublicKeyToken=89845dcd8080cc91' which has a higher version than referenced assembly 'Microsoft.SqlServer.ConnectionInfo, Version=, Culture=neutral, PublicKeyToken=89845dcd8080cc91'"

I tried to do what Microsoft suggest which is set AutoGenerateBindingRedirects to true but that did not work.


Where would I go to find the proper versions of the dlls?

sly sly

I can see both dlls in the same directory on my SQL Server installation:

c:\Program Files\Microsoft SQL Server\110\SDK\Assemblies\Microsoft.SqlServer.ConnectionInfo.dll
c:\Program Files\Microsoft SQL Server\110\SDK\Assemblies\Microsoft.SqlServer.Smo.dll

Using VS 2015 with .net 4.5.2 I'm able to reference both dlls, build, and run a console app that uses the ServerConnection and Server classes.

See if you can find the Microsoft.SqlServer.ConnectionInfo.dll in the 110\SDK folder.