Microsoft SQL Server Data Tools package did not load correctly - sql

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 :(

Related

SSIS error in VS 2019 - The Script Task "XXX" uses version 16.0 script that is not supported in this release of Integration Services

This error just started occurring on a few developers' systems across several packages, but I can't track down a specific cause or update. We have SSIS processes created across various targets (SQL 2012 and up), but when I open them in Visual Studio 2019 this error occurs:
Error loading XXXXXXX.dtsx: There was an exception while loading Script Task from XML: System.Exception: The Script Task "ST_36ae893a14204fac97ce8ce3b4ce8ebb" uses version 16.0 script that is not supported in this release of Integration Services. To run the package, use the Script Task to create a new VSTA script. In most cases, scripts are converted automatically to use a supported version, when you open a SQL Server Integration Services package in %SQL_PRODUCT_SHORT_NAME% Integration Services.
at Microsoft.SqlServer.Dts.Tasks.ScriptTask.ScriptTask.LoadFromXML(XmlElement elemProj, IDTSInfoEvents events)
I can open the script task, but it's as if it's new, none of the existing code is there. Some of the older packages I can open in like Visual Studio 2017 and they work, but in Visual Studio 2019 not so much. Even some packages built in Visual Studio 2019 are doing this. Here's my dev environment:
Microsoft Visual Studio Enterprise 2019
Version 16.11.17
VisualStudio.16.Release/16.11.17+32630.194
Microsoft .NET Framework
Version 4.8.04084
SQL Server Data Tools 16.0.62205.05200
Microsoft SQL Server Data Tools
SQL Server Integration Services 16.0.948.0
Microsoft SQL Server Integration Services Designer
I've tried changing the Target server to different versions, but it seems once the issue occurs it resets the script task removing all code. I'm really confused.
Any thoughts? Thanks.
Not sure if this is a good answer, but it does seem to fix the issue. I'm using SQL Server Integration Services 16.0.948.0 (v4.3), but if I go back down to 15.0.2000.180 (v3.16) the issue seems to go away. So, it's something with version 4.0 and up. Not ideal to go backwards as we're losing some of the updates - but it gets me going again. If anyone has other suggestions, please let me know.

Microsoft SQL Server Management Studio 18 application error on startup

1
[]
I just install Microsoft SQL Server Management Studio 18 and the window pop up with
"Ssms.exe - Application Error"
"the application was unable to start correctly (0xc000007b). Click OK to close the application."
I tried most of the solution found on Google and YouTube.
(Window Update, reinstall .net framework, .net runtime, microsoft visual c++ redistributable package, use admin to run program, re-install and repair Microsoft SQL Server Management Studio 18)
I will be really appreciated it.
UPDATE: [Solved] I use dependency Walker to find out which dll is crushing the program (in my case mscvr120.dll) and re-download it to fix the crush.

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()

MSBuild Errors for Database Project on TFS server with VS 2013 shell

Continuous Build Database Project fails when building on TFS server. We have Visual Studio 2013 Shell (Integrated) installed. There does not appear to be a way to install SQL Server Data Tools 2013 thru' Tools > Extensions and Updates... menu.
The redacted error is below...
C:\TFSBuild\XXX\XXX\Database_CI\Sources\Database\XXX\XXX.sqlproj (126): The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.
Has anyone experienced this? Is there a solution or work-around? Is SSDT available for VS 2013 Shell for SQL Server 2014?
I have recently installed the Visual Studio Shell (Isolated) and (Integrated) on our build server and it does not include the SQL Server tooling components. I found out that SQL Server tooling is built in to the following versions of Visual Studio (see here):
Express for Web,
Express for Windows Desktop,
Professional,
Premium, and
Ultimate
I would recommend installing at least the Professional version and then you should get the SQL Server Data Tools components that are required for building.
SQL Server Tooling is now built into the above listed versions of Visual Studio 2013 (SSDT and Visual Studio versions) and the latest March update of Visual Studio 2013 now includes SQL Server 2014 support (SQL Server Data Tools for SQL Server 2014 is available.)
To force your build to use the correct version of MSBuild set the Process - Advanced - MSBuild arguments = "/p:VisualStudioVersion=12.0" (without the quotes) as shown.
You can download SSDT for VS2012 here and that should get the database pre-reqs on your build server.
I do see mention of "Sql Server Tooling in Visual Studio 2013" on this landing page, and I think it implies these tools should be available with the shell, so if you could, check to see if you have that targets file somewhere on your build server.
Go into C:\Program Files(x86)\ and do a "dir Microsoft.Data.Tools.Schema.SqlTasks.targets /s /b" and see if something comes up.
Right now it's hard-coded to this location:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets
You might want to see if the file already exists, but in another location, like in an "v12.0" folder instead of the "v11.0" subfolder.
EDIT
Actually, what's the value on line 126 of your .sqlproj?
If it says this:
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v11.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets" />
Change it to read:
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets" />
Then have everyone test it using diagnostic logging, then gather the logs and compare them to make sure that version is consistent so you can start phasing out the legacy bits.
I had the same issue and fixed it by downloading and installing the following
dacframework.msi
SQLDOM.MSI
SQLLS.MSI
SQLSysClrTypes.msi
from here:
https://www.microsoft.com/en-au/download/details.aspx?id=42295

Visual Studio Unable to Add Data Connection to SQL Server

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)