Can't connect to SQL Server 2016 from Visual studio - c#

I am trying to connect to a SQL Server 2016 database from C# in Visual Studio. I keep getting the following error:
Unable to add data connection. Could not load file or assembly 'Microsoft.SqlServer.Management.Sdk.sfc, Version=12.0.0.0, Culture=neutral, PublicKeyToken='89845dcd8080cc91' or one of it's dependencies. The System Cannot find the file specified.
I downloaded and installed (the 2016 versions) of the following:
ENU\x64\SharedManagementObjects.msi
and
DB2OLEDBV5_x64.msi
as suggested in this thread: Could not load file or assembly Microsoft.SqlServer.management.sdk.sfc version 11.0.0.0
but I am still getting the error.
Edit: I am using Visual Studio 2015. I am trying to connect via the Server Explorer's "Connect to Database" Tab

Visual Studio 2015 needs the 2014 version of ENU\x64\SharedManagementObjects.msi Download SQL Server 2014 Feature Pack, which contains the 2014 version, and you should be good.
Microsoft® SQL Server® 2014 Feature Pack
https://www.microsoft.com/en-us/download/details.aspx?id=42295

Related

SSIS Deployment to Azure SQL Server, System.Net.Http.Formatting could not be found

I'm working on a project to setup a Visual Studio SSIS API package to deploy to our Azure SQL Server. It's supposed to grab data from TalentAPI and store it in our Sql Server tables through a SSIS to be executed by our SQL Server on a schedule.
This project was built with target SQL Server being 2019. Then I had to change it to SQL Server 2017 to allow it to work on Microsoft SQL Azure.
SSIS project was deployed using SSIS in SQL Server from Visual Studio 2019.
A script component source is used to make the call to TalentAPI to retrieve the data.
There is an error associated with a SSIS script component, about the System.Net.Http.Formatting could not be found when executing the package in Azure SQL Server. That so far, I've been unable to resolve.
Current Error:
Load Users data from TalentLMS to Onshore SQL DB:Error: System.IO.FileNotFoundException: Could not load file or assembly
'System.Net.Http.Formatting, Version=5.2.9.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies.
The system cannot find the file specified.
File name: 'System.Net.Http.Formatting, Version=5.2.9.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'
at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.HandleUserException(Exception e)
at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.PreExecute()
at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostPreExecute(IDTSManagedComponentWrapper100 wrapper)
Specs:
Visual Studio 2019,
SSIS Project target SQL Server 2017 currently,
System.Net.Http.Formatting 5.2.9.0,
Microsoft SQL Azure (RTM) - 12.0.2000.8 Oct 18 2022 13:24:45
Since the Microsoft SQL Azure (RTM) - 12.0.2000.8 is rented on an instance, I'm unable to determine which version of .NET is needed to match up.
Any thoughts?
Tried so far:
Clearing out the NuGet cache, clean solution, restoring Nuget packages, and build.
Setting the System.Net.Http.Formatting Copy Local attribute to True to try to copy the System.Net.Http.Formatting to SQL server when deployed.

SQL database not connecting to Visual Studio 2015

I have downloaded and installed Visual Studio 2015 Community (because it is being used in college professional version) and SQL Server 2016 Service Pack 3 with SQL Server Management Studio 18.
I have been trying to connect or create a new database connection and it is showing me the attached error
Could not load file or assembly 'Microsoft.SqlServer.Management.Sdk.Sfc, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies.
I have tried multiple solutions here and it took me a whole day and it's still not fixed.
I have downloaded all SQL Server features from feature pack found from here: https://www.microsoft.com/en-us/download/details.aspx?id=103444
Installed packages via nupkg still no success.
Also, I checked the C:/Program Data/assembly and it contained the Microsoft.SqlServer.Management.Sdk.Sfc version 13.0.0.0
while it gives the error of 12.0.0.0.
I need help!
PS: I had previously installed 2019 version but uninstalled it and all of it's components (I think all) is it the issue? if that is recommend something to solve this issue, I have a project to show on Monday.
Please try download and install Microsoft SQL Server System CLR Types and Microsoft SQL Server 2014 Shared Management Objects from :
https://www.microsoft.com/en-US/download/details.aspx?id=42295
In addition, which version of your Windows? If you are using Windows 10, SQL Server 2012 requires service pack 2 to make it compatible with Windows 10. Please download and install from below link.
http://www.microsoft.com/en-us/download/details.aspx?id=43351

SQL Server 2017 Express missing from visual studio setup wizard prerequisites

I have installed Microsoft Visual Studio 2017 Installer Projects, but SQL Server 2017 express is missing from prerequisite
How to add SQL Server 2017 Express? (I'm using WPF project with .NET Framework 4.6.1).
I tried SQL Server 2012 Express and got the following error:
WARNING: Item 'SQL Server 2012 Express' could not find any of dependent items '.NETFramework,Version=v4.5, .NETFramework,Version=v4.0'.
ERROR: To enable 'Download prerequisites from the same location as my application' in the Prerequisites dialog box, you must download file 'SqlExpress2012\SQLEXPR32_x86_ENU.EXE' for item 'SQL Server 2012 Express' to your local machine. For more information, see http://go.microsoft.com/fwlink/?LinkId=616018.
Thanks.

Database connection error in Visual Studio 2013

I am using Visual Studio 2013 and have installed MS SQL Server 2014. I am trying to generate my database from a model (edmx) but I get the following error (screenshot attached):
In the edmx.sql file, is written:
-- Entity Designer DDL Script for SQL Server 2005, 2008, 2012 and Azure
I can see that 2014 version is missing from this generated file, and seems that the program tries to connect to the 2012 version .. how can I avoid this and manage visual studio tu use the 2014 version of MS SQL Server?
Thanks in advance
What Sql Server data tools are you using?
Have you tried newer version of it:
Microsoft® SQL Server Data Tools for SQL Server® 2014 CTP2

Connect to the database using wizard in c# using visual studio 2008 SPI version

I am a student and I am learning how to connect to access database using wizard in c# and I using visual studio 2008 SPI version I am getting the following error with I try to add the data source:
An unexpected error has occurred.
Error Message: Could not load type
'Microsoft.VisualStudio.DataDesign.SyncDesigner.SyncFacade.SyncManager' from assembly
'Microsoft.VisualStudio.DataDesign.SyncDesigner.DslPackage, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
I tired uninstall and reinstall the program. Do anybody know the answer
I had the same problem .You have to upgrade with install VS 2008 SP1(It must match windows SP).
i got the solution from microsoft connect bug traker here's the link

Categories

Resources