4

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)

4
  • Do you have a reference to the dll in your project? You can try removing that reference and adding it again. Commented Dec 25, 2014 at 20:56
  • What ms sql server version? Commented Dec 25, 2014 at 20:58
  • @codemonkey No i dont have any references in the project ( It a fresh one) Commented Dec 26, 2014 at 12:15
  • @Maciej Los: I think its SQL Server 2012 Commented Dec 26, 2014 at 12:15

4 Answers 4

4

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.

Sign up to request clarification or add additional context in comments.

5 Comments

i did like you said, now i cant even create a new database file !
may be its related with your VS version.
Nah fixed it by reinstalling visual studio
Links are dead, 404...
SMO objects are now available as NuGet packages: learn.microsoft.com/en-us/sql/relational-databases/…
1

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.

Comments

0

Okay

I had to run the installer of Visual studio again, then it worked!

Comments

0

Problem: This issue happens when assembly Microsoft.SqlServer.ConnectionInfo, Version=12.0.0.0 not found by visual studio. The problem was Visual C++ Redistributable Packages for Visual Studio was not installed yet.

Solution: for Visual Studio 2013 just go to http://www.microsoft.com/en-us/download/details.aspx?id=40784 and download:

  • vcredist_x64.exe for X64 OS or
  • vcredist_x86.exe for X86 OS,

then install it, and restart visual studio.


PS: You can find Visual C++ Redistributable Packages for Visual Studio 20XX for other versions of Visual Studio easily by googling it.

1 Comment

Looking here: microsoft.com/en-us/download/details.aspx?id=48145, it makes no mention of SQL server components. I don't think installaing that package will install SQL server components.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.