Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error Microsoft.SqlServer.ConnectionInfo in Sql

I have a SQL Server database file Database1.mdf. Every time I want to add a New Component (does not matter if it's a table, a function or something else), I get this error

The File or Assenbly "Microsoft.SqlServer.ConnectionInfo, Version=12.0.0.0, Culture=neutral, PublicKeyToken=8845dcd8080cc91" or one of its dependencies not found. The system can not find the file specified.

I did install the SQLSysClrTypes.msi and the SharedManagmentObjects.msi.

Does anyone know what's wrong?

I'm using Visual Studio 2013 Ultimate (Trial)

like image 233
Ch3t0r Avatar asked Sep 01 '25 21:09

Ch3t0r


2 Answers

Symptoms:

You receive the following error:

Could not load file or assembly 'Microsoft.SqlServer.ConnectionInfo[...]

Cause:

You have not installed the SQL Shared Management Objects (SMO). They are needed to create tables and other SQL objects from TX.

Resolution:

Download the SQL Shared Management Objects from the SQL Server Feature Packages and install it. The download sites are linked below - the file you need is called SharedManagementObjects.msi.

  1. SQL Server 2012

  2. SQL Server 2008 R2

  3. SQL Server 2008

  4. SQL Server 2005

  5. SQL Server 2019 - SMO Objects are now available in a NuGet package

Please be aware that if you are using another version of SQL server, you must find the right version of the feature packages.

Notes: If you are deploying to multiple versions of SQL Server, you must install all the relevant versions of SMO/XMO. For example, if staging is SQL 2008 and Data Warehouse is SQL 2012, you must install both of these files.

SQL Native Client is a pre-requisite and will in most cases need to be installed first. In some cases, you wil also need to install the Analysys Management Objects package to resolve this error.

like image 167
Avijit Avatar answered Sep 03 '25 10:09

Avijit


I face this problem too. The problem was fixed by replace the same version of Microsoft.SqlServer.ConnectionInfo.dll in application and database. So Please make sure that you are using sql sever 2014(Version 12.0.0.0) and Microsoft.SqlServer.ConnectionInfo.dll version 12.0.0.0 too.

like image 22
Leng Sovandara Avatar answered Sep 03 '25 09:09

Leng Sovandara