Closed greg84 closed 4 months ago
@greg84 Maybe you could share your .sqlproj file?
Fixed it by removing this line:
<Import Project="Microsoft.Data.Tools.Schema.SqlTasks.targets" />
Sorry, closing this ticket.
Thanks @greg84! You got it - removing the reference to those targets. The Microsoft.Data.Tools.Schema.SqlTasks
item correlates to the previous SQL project format, the targets necessary for Microsoft.Build.Sql are automatically included for all platforms.
Steps to Reproduce:
<Project>
in my sqlproj file:<Sdk Name="Microsoft.Build.Sql" Version="0.1.14-preview" />
dotnet build
from the folder containing the sqlproj file.Build fails with this error:
C:\Users\me.nuget\packages\microsoft.build.sql\0.1.14-preview\tools\netstandard2.1\Microsoft.Data.Tools.Schema.SqlTasks.targets(546,7): error MSB4094: "D:\myproject\bin\Debug\mydatabase.dacpac;D:\myproject\bin\Debug\mydatabase.dacpac" is an invalid value for the "SqlTarget" parameter of the "SqlBuildTask" task. Multiple items cannot be passed into a parameter of type "Microsoft.Build.Framework.ITaskItem". [D:\myproject\bin\Debug\mydatabase.sqlproj]