Reputation: 70307
I'm getting this error in Visual Studio 2017 15.5.2 when I compile my SSDT projects. But if I compile from the command line, it works as expected.
C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\MSBuild\Microsoft\VisualStudio\v15.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets(559,5): Error: MSB4018: The "SqlBuildTask" task failed unexpectedly.
System.MissingMethodException: Method not found: 'Void Microsoft.Data.Tools.Schema.Sql.Deployment.SqlCmdFileVerifier..ctor(Microsoft.SqlServer.TransactSql.ScriptDom.TSqlParser, System.Collections.Generic.IDictionary`2<System.String,System.String>, Boolean)'.
at Microsoft.Data.Tools.Schema.Tasks.Sql.SqlBuildTask.ExecutePrePostScriptsValidationStep()
at Microsoft.Data.Tools.Schema.Tasks.Sql.SqlBuildTask.ExecuteStep(Func`1 step)
at Microsoft.Data.Tools.Schema.Tasks.Sql.SqlBuildTask.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()
I've already tried a "Repair" on Visual Studio and manually reinstall SSDT.
Any other suggestions?
More info:
Microsoft Visual Studio Enterprise 2017 Version 15.5.2 VisualStudio.15.Release/15.5.2+27130.2010 Microsoft .NET Framework Version 4.7.02046
Installed Version: Enterprise
Visual Basic 2017 00369-90250-45713-AA233 Microsoft Visual Basic 2017
Visual C# 2017 00369-90250-45713-AA233 Microsoft Visual C# 2017
Visual C++ 2017 00369-90250-45713-AA233 Microsoft Visual C++ 2017
Visual F# 4.1 00369-90250-45713-AA233 Microsoft Visual F# 4.1
Application Insights Tools for Visual Studio Package 8.10.01106.1 Application Insights Tools for Visual Studio
ASP.NET and Web Tools 2017 15.0.31125.0 ASP.NET and Web Tools 2017
ASP.NET Core Razor Language Services 1.0 Provides languages services for ASP.NET Core Razor.
ASP.NET Web Frameworks and Tools 2017 5.2.51007.0 For additional information, visit https://www.asp.net/
Azure App Service Tools v3.0.0 15.0.31106.0 Azure App Service Tools v3.0.0
CodeMaid 10.4.53 CodeMaid is an open source Visual Studio extension to cleanup and simplify our C#, C++, F#, VB, PHP, PowerShell, R, JSON, XAML, XML, ASP, HTML, CSS, LESS, SCSS, JavaScript and TypeScript coding.
CodeRush for Roslyn 17.2.4.0 DevExpress CodeRush for Roslyn package.
CodeRush for Roslyn Tool Windows 17.2.4.0 DevExpress CodeRush for Roslyn Tool Windows package.
Common Azure Tools 1.10 Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.
GhostDoc 5.8.17335.0 Generate XML Comments from your code, maintain clean and up-to-date documentation, produce help documentation in multiple formats, use intelligent source code Spell Checker in Visual Studio.
JavaScript Language Service 2.0 JavaScript Language Service
JavaScript Project System 2.0 JavaScript Project System
Markdown Editor 1.11.214 A full featured Markdown editor with live preview and syntax highlighting. Supports GitHub flavored Markdown.
Microsoft Azure Tools 2.9 Microsoft Azure Tools for Microsoft Visual Studio 2017 - v2.9.51120.3
Microsoft Continuous Delivery Tools for Visual Studio 0.3 Simplifying the configuration of continuous build integration and continuous build delivery from within the Visual Studio IDE.
Microsoft JVM Debugger 1.0 Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines
Microsoft MI-Based Debugger 1.0 Provides support for connecting Visual Studio to MI compatible debuggers
Microsoft Visual C++ Wizards 1.0 Microsoft Visual C++ Wizards
Microsoft Visual Studio Tools for Containers 1.1 Develop, run, validate your ASP.NET Core applications in the target environment. F5 your application directly into a container with debugging, or CTRL + F5 to edit & refresh your app without having to rebuild the container.
Microsoft Visual Studio VC Package 1.0 Microsoft Visual Studio VC Package
NuGet Package Manager 4.5.0 NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.
Redgate SQL Prompt 1.0 Write, format, and refactor SQL effortlessly
Snapshot Debugging Extension 1.0 Snapshot Debugging Visual Studio Extension Detailed Info
SQL Server Data Tools 15.1.61710.120 Microsoft SQL Server Data Tools
TypeScript Tools 15.5.11025.1 TypeScript Tools for Microsoft Visual Studio
Visual Studio Code Debug Adapter Host Package 1.0 Interop layer for hosting Visual Studio Code debug adapters in Visual Studio
Upvotes: 0
Views: 1027
Reputation: 121
I had the same issue after updating to 15.5.2 today. Upon some searching, I found this chain in a Redgate forum: https://forum.red-gate.com/discussion/82371/builds-now-fail-after-installing-sql-toolbelt
I had recently upgraded from an older version of SQL Prompt, too. When I downloaded and installed SQL Prompt v9.0.4.3408 as noted in the accepted answer, that fixed my issue.
Direct download link to SQL Prompt v9.0.4.3408 (from forum post above) is here: ftp://support.red-gate.com/patches/SQLPrompt/20Dec2017/SQLPrompt_9.0.4.3408.exe
Hope it is as simple for you.
Upvotes: 1