VS 2013 SqlBuildTask 04018 Error

Franklin picture Franklin · Sep 17, 2014 · Viewed 15.5k times · Source

After updating to a recent service pack my Database project no longer builds.

I get the following error:

Error 1 04018: The "SqlBuildTask" task failed unexpectedly. System.MethodAccessException: Attempt by method 'Microsoft.Data.Tools.Schema.Sql.Build.SqlTaskHost.OnCreateCustomSchemaData(System.String, System.Collections.Generic.Dictionary2<System.String,System.String>)' to access method 'Microsoft.Data.Tools.Components.Diagnostics.SqlTracer.ShouldTrace(System.Diagnostics.TraceEventType)' failed. at Microsoft.Data.Tools.Schema.Sql.Build.SqlTaskHost.OnCreateCustomSchemaData(String filePath, Dictionary2 referenceMetadata) at Microsoft.Data.Tools.Schema.Sql.Build.SqlTaskHost.CreateCustomSchemaData(String filePath, Dictionary2 referenceMetadata) at Microsoft.Data.Tools.Schema.Tasks.Sql.TaskHostLoader.ProcessReferences(TaskLoggingHelper providedLogger, SqlTaskHost host, ErrorManager errors) at Microsoft.Data.Tools.Schema.Tasks.Sql.TaskHostLoader.LoadImpl(ITaskHost providedHost, TaskLoggingHelper providedLogger) at Microsoft.Data.Tools.Schema.Tasks.Sql.TaskHostLoader.Load(ITaskHost providedHost, TaskLoggingHelper providedLogger) at Microsoft.Data.Tools.Schema.Tasks.Sql.SqlBuildTask.ExecuteLoadTaskHostStep() at Microsoft.Data.Tools.Schema.Tasks.Sql.SqlBuildTask.ExecuteStep(Func1 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.d__20.MoveNext() C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets

I have tried rebooting and repairing VS2013 Thanks for any thoughts.

Answer

Mauro Bilotti picture Mauro Bilotti · Dec 10, 2014

You need to install the last version of SQL Server Data Tools http://msdn.microsoft.com/en-US/data/hh297027