0

Web deployment task failed. (The SQL provider cannot run because of a missing dependency. Please make sure that Microsoft SQL Server Transact-SQL ScriptDom is installed.

I get this error while publishing any web app in visual studio with update database enabled. It was working fine until I upgraded SQL SERVER MANAGEMENT Studio to 2016.

I tried unistalling and reinstalling sql server and all required components but in vain

Any suggestions will be appreciated

Thanks

irfandar
  • 1,690
  • 1
  • 23
  • 24

6 Answers6

2

Registering the ScriptDom assembly in the GAC solved this for us:

"%ProgramFiles(x86)%\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.2 Tools\gacutil" /i "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\SQLDB\DAC\130\Microsoft.SqlServer.TransactSql.ScriptDom.dll
fiat
  • 15,501
  • 9
  • 81
  • 103
2

I had to

Use Web Platform Installer to install:

  1. Microsoft SQL Server 2012 Data-Tier Application Framework

  2. SQL Server 2012 Transact-SQL ScriptDom

  3. SQL Server System CLR Types 11.0

AND register it myself (adjusting for version numbers)

"%ProgramFiles(x86)%\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.2 Tools\gacutil" /i "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\SQLDB\DAC\130\Microsoft.SqlServer.TransactSql.ScriptDom.dll
Ben Logan
  • 187
  • 10
  • I installed the stuff and it still wasn't working, doing the registration is what finally did it for me – Josh G Nov 22 '17 at 14:37
  • For Visual Studio 2017 Enterprise: "%ProgramFiles(x86)%\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.2 Tools\gacutil" /i "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\Extensions\Microsoft\SQLDB\DAC\140\Microsoft.SqlServer.TransactSql.ScriptDom.dll" – Krzysztof Gapski Jun 04 '18 at 13:31
1
  • DacFxNeededForSQLProvider
  • ERROR_SCRIPTDOM_NEEDED_FOR_SQL_PROVIDER
  • ERROR_SQLCLRTYPES_NEEDED_FOR_SQL_PROVIDER

The group of 3 errors listed above share the following diagnosis and resolution:

Diagnosis: SQL DAC and its dependencies are not installed

Resolution: Use Web Platform Installer to install:

  1. Microsoft SQL Server 2012 Data-Tier Application Framework
  2. SQL Server 2012 Transact-SQL ScriptDom
  3. SQL Server System CLR Types 11.0

source

fiat
  • 15,501
  • 9
  • 81
  • 103
1

Installing the SQL Server Data Tools (SSDT) package for Visual Studio 2012 resolved the error for me.

You can download the installer for VS2012 and VS2013 from here: https://msdn.microsoft.com/en-us/library/mt674919.aspx#Anchor_0

Aidan
  • 313
  • 1
  • 6
1

Run below code in command prompt, it works.

"C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.2 Tools\gacutil" /i "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\SQLDB\DAC\130\Microsoft.SqlServer.TransactSql.ScriptDom.dll"

click here for source

0

Registering all of these dll to gac works for me. Write all of these command to command prompt. Make sure to open cmd as "Administrator"

"%ProgramFiles(x86)%\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\gacutil" /i "C:\Program Files (x86)\Microsoft SQL Server\140\DAC\bin\Hyak.Common.dll "%ProgramFiles(x86)%\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\gacutil" /i "C:\Program Files (x86)\Microsoft SQL Server\140\DAC\bin\Microsoft.Azure.KeyVault.dll "%ProgramFiles(x86)%\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\gacutil" /i "C:\Program Files (x86)\Microsoft SQL Server\140\DAC\bin\Microsoft.Data.Tools.Utilities.dll "%ProgramFiles(x86)%\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\gacutil" /i "C:\Program Files (x86)\Microsoft SQL Server\140\DAC\bin\Microsoft.IdentityModel.Clients.ActiveDirectory.Platform.dll "%ProgramFiles(x86)%\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\gacutil" /i "C:\Program Files (x86)\Microsoft SQL Server\140\DAC\bin\Microsoft.SqlServer.Dac.Extensions.dll "%ProgramFiles(x86)%\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\gacutil" /i "C:\Program Files (x86)\Microsoft SQL Server\140\DAC\bin\Microsoft.Threading.Tasks.dll "%ProgramFiles(x86)%\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\gacutil" /i "C:\Program Files (x86)\Microsoft SQL Server\140\DAC\bin\Microsoft.Azure.Common.dll "%ProgramFiles(x86)%\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\gacutil" /i "C:\Program Files (x86)\Microsoft SQL Server\140\DAC\bin\Microsoft.Data.Tools.Schema.Sql.dll "%ProgramFiles(x86)%\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\gacutil" /i "C:\Program Files (x86)\Microsoft SQL Server\140\DAC\bin\Microsoft.IdentityModel.Clients.ActiveDirectory.dll "%ProgramFiles(x86)%\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\gacutil" /i "C:\Program Files (x86)\Microsoft SQL Server\140\DAC\bin\Microsoft.SqlServer.DacAzureExtensions.dll "%ProgramFiles(x86)%\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\gacutil" /i "C:\Program Files (x86)\Microsoft SQL Server\140\DAC\bin\Microsoft.SqlServer.Management.AlwaysEncrypted.AzureKeyVaultProvider.dll "%ProgramFiles(x86)%\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\gacutil" /i "C:\Program Files (x86)\Microsoft SQL Server\140\DAC\bin\Microsoft.SqlServer.Types.dll "%ProgramFiles(x86)%\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.6.1 Tools\gacutil" /i "C:\Program Files (x86)\Microsoft SQL Server\140\DAC\bin\Extensions\Microsoft.SqlServer.Services.ImportExport.DacFxExtensions.dll

JXG
  • 7,263
  • 7
  • 32
  • 63