Visual Studio Unable to Add Data Connection to SQL Server - sql

Im trying to add my local SQL Server database to Visual Studio so I can grab the connection string from it but I am getting this error message:
As you can see the Test succeeds but when I try to add I receive error.

I figured out that you need to have SDK.sfc 11.0.0.0 installed. I only had 10.0.0.0 installed.
You can use the link here to download "Microsoft® System CLR Types for Microsoft® SQL Server® 2012" and "Microsoft® SQL Server® 2012 Shared Management Objects"
Download Link
I think these are normally installed with VS 2012 but in either case it fixed the issue. You can check your version in the assembly path:
C:\windows\assembly
The install does not require a restart but you will need to close and reopen your Visual Studio.

It seems that you are missing some updates from Microsoft: one link
You could search with google/bing/whatever and find a lot of hints to get this working!

for both type (32 bit or 64 bit )
Open URL http://www.microsoft.com/en-us/download/details.aspx?id=35580
Download ENU\x86\SQLSysClrTypes.msi
Download ENU\x86\SharedManagementObjects.msi
Install ENU\x86\SQLSysClrTypes.msi
Install ENU\x86\SharedManagementObjects.msi
Restart your Visual Studio and now Everything will work smooth.
This fix was for the error (version 11.0.0.0)

Related

Visual Studio 2013: Database Project MSBuild error

I've got a database project as part of my solution in Visual Studio 2013. Been working perfectly for the last 3 weeks and now suddenly today it won't build and so I cannot publish any changes. I'm getting an MSBuild error:
"C:\Program Files
(x86)\MSBuild\Microsoft\VisualStudio\v12.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets(513,5):
Error: MSB4018: The "SqlBuildTask" task failed unexpectedly.
System.MethodAccessException: Attempt by method 'Microsoft.Data.Tools.Schema.Sql.Build.SqlTaskHost.OnCreateCustomSchemaData(System.String,
System.Collections.Generic.Dictionary`2)'
to access method
'Microsoft.Data.Tools.Components.Diagnostics.SqlTracer.ShouldTrace(System.Diagnostics.TraceEventType)'
failed."
Anyone got any ideas? All I did this morning was pull down the latest changes from source control. I can't see how that would mess up the actual MSBuild process, and the guy who checked in last doesn't have any issues at all.
You need to install the last version of SQL Server Data Tools:
http://msdn.microsoft.com/en-US/data/hh297027
Make sure to restart VS and then build the solution again. This solves the problem!
In Visual Studio 2013 -> Tools -> Extensions and Updates... -> Updates -> Product Updates -> Microsoft SQL Server Update for database to 12.0.50318.0
I was upgrading from 12.0.41012.0 and this resolved my issue. This relates to the answer to install the latest SQL Server Data Tools.
I am using Visual Studio Community 2013.
I had same error:
You can fix it by updating the SQL Server Tools:
Tools --> Extensions and Updates
Then under Product Updates you will see an option to update SQL Server Update.
Click on Update, after it has installed restart Visual Studio.
Try:
Install the latest DacFx from http://www.microsoft.com/en-us/download/details.aspx?id=43370
Reinstall the latest SSDT from http://go.microsoft.com/fwlink/?LinkID=393521
Source: VS2013 SqlBuildTask 04018 Error
I searched "Visual Studio 2013 Update 2" in MSDN subscriber downloads and it was there
Also I filed a bug with MS
VS2013 SqlBuildTask 04018 Error Please up vote it if you are getting the same problem
I had the same issue. I tried to repair Visual Studio 2013, update 4, SSDT, the DAC tools, etc., but it didn't work any better.
However I noticed the Microsoft.Data.Tools.Schema.SqlTasks.targets file present in C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\SSDT was dated from 2013 (In fact it corresponded to the old SSDT). So what I did is just copy the new one (which I suprisingly found in C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\SSDT ...) over to this v12.0\SSDT folder, restarted Visual Studio 2013 and now it works. For information, that new SSDT targets file is dated from 2014/10/26 and its size is 75437 bytes.
It turns out the issue was with Visual Studio Update 3. I uninstalled and reinstalled VS 2013 to Update 2 only and reinstalled Data Tools and it works perfectly now.
I already had the newest Version of SQL Data Tools installed, but after installing VS2015 RC it stopped to work. After run a repair on SSDT it compiles again with success.
I had Visual Studio 2013 Update 5 installed and was having this issue. I followed these steps from above and that fixed the issue for me -->
In Visual Studio 2013 -> Tools -> Extensions and Updates... -> Updates -> Product Updates -> Microsoft SQL Server Update for database to 12.0.50730.0
I had the same issue and just restart the Visual Studio and it works for me.
I experienced the same issue with a slightly different stack trace:
Error MSB4018: The "SqlBuildTask" task failed unexpectedly.
System.IO.IOException: The file exists.
Turns out this is a issue with the Temp directory for the service account I was using, I think if you exceed X number of folders/files in that directory the publish will no longer work. Fixed this issue by following the instructions mentioned here (for my service account):
Go start-> run
Type %temp% and click ok
Make sure you are in the folder /Local/Temp
Delete everything in this folder
If it helps anybody, I installed VS2014 CTP 3, and I can build from it. Interestingly after a successfull build in vs2014, the next time you build in VS2013 it works. But subsequent builds in VS2013 dont work, until you rebuild in VS2014.
I was able to fix the issue by repairing Microsoft SQL Server Data Tools and re-starting Visual Studio 2013.
Control Panel > Right Click: "Microsoft SQL Server Data Tools" > Click: "Repair" > Re-Start Visual Studio
I had the same issue. Running disk check and then rebooting fixed it.
I got the same error and fix it by re-install Visual Studio 2015
I had this problem and fixed it like this:
install the latest DacFx from http://www.microsoft.com/en-us/download/details.aspx?id=43370
Delete the Microsoft.Data.Tools.Schema.SqlTasks.targets file from C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\SSDT
repair SQL Server Data Tools 2013 , reset visual studio()

Microsoft SQL Server Data Tools package did not load correctly

Everything about my VS 2013 install appears to be working correctly except when I right click on a table in Server Explorer. I am trying to use the data tools to view the table, which is in a MS SQL database. Here is the message VS 2013 pops when I right click:
The 'Microsoft SQL Server Data Tools' package did not load correctly.
The problem may have been caused by a configuration change or by the installation of another extension. You can get more information by examining the file 'C:\Users\...\AppData\Roaming\Microsoft\VisualStudio\12.0\ActivityLog.xml'.
Here are the last few lines of the ActivityLog.xml, btw one of the most cryptic log files I have ever read:
1222 Begin package load [Microsoft SQL Server Data Tools] {00FEE386-5F9F-4577-99F4-F327FAFC0FB9} VisualStudio 2014/02/14 13:50:50.112
1223 ERROR SetSite failed for package [Microsoft SQL Server Data Tools] {00FEE386-5F9F-4577-99F4-F327FAFC0FB9} 80131534 VisualStudio 2014/02/14 13:50:50.641
1224 Entering function CVsPackageInfo::HrInstantiatePackage {FEF13793-C947-4FB1-B864-C9F0BE9D9CF6} VisualStudio 2014/02/14 13:50:50.650
1225 Warning Unexpected system error mode before loading package [SqlStudio Editor Package] {FEF13793-C947-4FB1-B864-C9F0BE9D9CF6} VisualStudio 2014/02/14 13:50:50.650
1226 Begin package load [SqlStudio Editor Package] {FEF13793-C947-4FB1-B864-C9F0BE9D9CF6} VisualStudio 2014/02/14 13:50:50.650
1227 End package load [SqlStudio Editor Package] {FEF13793-C947-4FB1-B864-C9F0BE9D9CF6} VisualStudio 2014/02/14 13:50:50.691
1228 ERROR End package load [Microsoft SQL Server Data Tools] {00FEE386-5F9F-4577-99F4-F327FAFC0FB9} 80131534 VisualStudio 2014/02/14 13:50:51.044
Here is what I have done to try to solve this problem:
Disabled all plugins/extensions
Checked for and applied all updates for all extensions and VS 2013 including Update 1
Did a full VS 2013 install repair operation
VS 2013 now includes the SSDT tools in VS 2013, so I cannot download and install anything, it is suppose to already be working. Not unless someone knows of a different trick.
I am out of ideas and I have searched quite extensively about this, most of it applied to VS 2012. If anyone has any good suggestions, that would be awesome.
Go to 'Add/Remove Programs' in Control Panel, search for "Microsoft SQL Server Data Tools" and repair.
Worked for me.
And just in case none of those work, you can go to the Download Latest SQL Server Data Tools Microsoft page itself. It lists out the versions of the tool set for each version of Visual Studio
I had the same issue. After trying the other answers and not resolving the issue, I was able to resolve it by
Uninstalling Sql Server Data Tools from the control panel
Navigating to Extensions and Updates
Go to Updates tab -> Update Visual Studio
You should get a prompt to enable optional features, choose SSDT
Wait for the long installation process, restart if necassary.
Fixed it for me
It is not in VS after 2012. Try this link, install separately
http://www.microsoft.com/en-us/download/details.aspx?id=42313
There is no stand-alone install for VS 2022 :(

Error 0x84b10001 when installing SQL Server 2012 on a machine with VS2013

I'm trying to install SQL Server Express with Service Pack 1 on my Win8 Pro (x64) development machine and I'm consistently getting an error 0x84b10001 when trying to install it:
Antivirus is disabled during the installation (done as Administrator) and I tried 2 versions of the SQL Server Express package and I'm getting the same issue with both.
I'm getting the same issue whether I'm trying the x86 or x64 packages.
I suspect that the issue comes from the fact that Visual Studio 2013 has already installed some SQL Server packages but I do not see any way to update and modify these to add the Management Studio for istance.
Well, turns out that this cryptic error is due to an older instance of SQL Server Desktop Engine (MSDE) being present.
After uninstalling MSDE, the SQL Server 2012 setup worked without errors.
Create a new local user with administative rights and try the installation again. In my case it solves the problem with MSSQL 2008R2.
Create new user with administrative privileges and install using that user. It worked.
Remove folder:
C:\Users[USER ID]\AppData\Local\Microsoft_Corporation
It worked for me.
If you try to install SQL Server 2014 and get this error, use this web site:
http://anewdomain.net/2013/10/21/how-to-enable-net-framework-2-0-and-3-5-in-windows-8-1-for-older-programs/
You should install .NET Framework 2.0 and 3.5 first. You should check the framework versions on your PC. If you have only 4.5, you will continue to get the same error code.
Anyway, I fixed my trouble.
I hope it helps you too.
In my case, it was because trying to install an x86 package on an x64 windows, installing x64 package worked for me.

Cannot find a dll for SQL Server from VS 2012

Microsoft Visual Studio
Could not load file or assembly
'Microsoft.SqlServer.Management.Sdk.Sfc, Version=11.0.0.0,
Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its
dependencies. The system cannot find the file specified.
I cannot "see" the referenced DLL even though it is in the proper spot. I can therefore not bind the datasource to the control. What might I be failing to do?
Please see original question and answer here: Could not load file or assembly Microsoft.SqlServer.management.sdk.sfc version 11.0.0.0
Problem: This issue happens when assembly Microsoft.SqlServer.management.sdk.sfc version 11.0.0.0 not found by visual studio 2012.(Sql server 2012)
Solution: just go to http://www.microsoft.com/en-us/download/details.aspx?id=35580 and download:
ENU\x64\SharedManagementObjects.msi for X64 OS or
ENU\x86\SharedManagementObjects.msi for X86 OS,
then install it, and restart visual studio.
Problem: This issue happens when assembly Microsoft.SqlServer.management.sdk.sfc version 10.0.0.0 not found by visual studio 2010.(Sql server 2008)
Solution: just go to http://www.microsoft.com/en-us/download/details.aspx?id=26728 and download:
1033\x64\SharedManagementObjects.msi for X64 OS or
1033\x86\SharedManagementObjects.msi for X86 OS,
(In most cases downloading this is better http://go.microsoft.com/fwlink/?LinkId=123708&clcid=0x409)
then install it, and restart visual studio.
From here:-
From the error message, we can see there is some missing component in
VS 2012 installation. The assembly in question -
Microsoft.SqlServer.Manangement.Sdk.Sfc version 11 - is a component
DLL for SMO assemblies (even though SFC was originally created for
more ambitious SSMS extension), and it is included in SQL Server 2012
Shared Management Objects.
[SQL 2012 Shared Management Objects] has dependency on [SQL System
CLR types] component, so you have to install SQL Server System CLR
Types first.
[SQL Server 2012 System CLR Types] can be found in the middle of SQL
2012 Feature Pack web page (
http://www.microsoft.com/en-us/download/details.aspx?id=29065 )
Just want to share my experience on this.
I, too, encountered this error. I'm using MS Visual Studio 2013 and I have an MS SQL Server 2008, though I have had MS SQL Server 2012 Installed before.
I was banging my head on this error for a day. I tried installing SharedManagementObject, SQLSysClrTypes and Native Client, but it didn't work. Why? Well I finally figured that I was installing 2008 or 2012 version of the said files, while I'm using Visual Studio 2013!! My idea is since it is a database issue, the version of the files should be the same with the MS SQL Server installed on the laptop, but apparently, I should have installed the 2013 version because the error is from the Visual Studio and not from the SQL Server.
I had this problem after installing SQL Server Express 2014. Apparently 2012 points to some files that are in 2014 and I completely erased all old versions of SQL Server. After much frustration I ended up reloading Visual Studio 2013 and it set up all of the files it needed and now works with SQL Server Express 2014

I'm having problems connecting to TFS VS2010 from VS 2008

If you are not able to connect to TFS VS2010 from VS2008. This might save you some time.
Connecting from VS2008 to TFS VS2010
Step:1 Make sure that Service Pack 1 is installed with Sql Server 2008
Step:2 Make sure that Service Pack 1 is installed with VS2008
Step:3 Make sure that Team Explorer is installed in VS 2008
Step:4 Make sure that Service pack 1 is updated for Team Explorer
Step:5 After all these Service Packs are installed on your machine, follow the below path
CmdPrompt> regedit
Hkey_Current_User>Software>Microsoft>VisualStudio>9.0>TeamFoundation> Right Click Servers>New>String Value
Give the complete URL path which look like ‘http://swstfs:8080/tfs/DefaultCollection’
Step:6 Close everything and open VS2008
File>Open>TeamProject
Step: 7 Connect.
I connected to TFS, but the problem is while I am trying to open the solution through VS2008 into TFS it is showing me an error
"This project (fmPilot.SSIS.ClientIntegrations.sln) cannot be opened from source control because it was created by a version of Microsoft Visual Studio that is incompatible with this one.
If this is the case, you may be able to open it from source control using that version of Microsoft Visual Studio, and then use Microsoft Visual Studio to open the local copy."
I also tried it through VS2010 but it is showing me an error
"Cannot be openned because its project type(/dtproj) is not supported bby this version of the application."
Can somebody help me on that..... I google it some says that permission might be the reason.. Please help me...
Thanks,
Karthik
Make sure that you have Business Intelligence Development Studio (BIDS) installed on your machine. Having just Visual Studio 2008 doesn't mean that you can open SSIS packages.
To verify whether you have BIDS installed:
Open Visual Studio 2008 IDE. Click Help and About Microsoft Visual Studio.
Make sure that you see SQL Server Integration Service.
Another way to verify is by trying to create a new project in VS 2008. You should see Business Intelligence Projects under Project types.
If you do not see this, then it means you don't have BIDS installed on your local machine. You can install BIDS by installing SQL Server 2008 client tools.
Following link shows how to install SQL Server 2008 client tools.
SQL Server 2008 Client Tools Installation