msbuild deploy command fails with exception

arielman2304 676 Reputation points
2021-04-07T08:24:11.73+00:00

I'm trying to deploy sql server database thought CMD with msbuild (it works fine from VS). This is the command I'm using:

msbuild "Database Services\Database Services.sqlproj" /t:deploy /p:TargetConnectionString="TEST05,123;Integrated Security=True;Persist Security Info=False;Pooling=False;MultipleActiveResultSets=False;Connect Timeout=60;Encrypt=False;TrustServerCertificate=False" /p:TargetDatabase="test_fsdb"

but I'm getting the below exception:

error MSB4018: The "SqlDeployTask" task failed unexpectedly. [C:\project\Database Services\Database Services.sqlproj]
error MSB4018: System.ArgumentException: Keyword not supported: 'TEST05,123;integrated security'. [C:\project\Database Services\Database Services.sqlproj]]

What does this error means? I don't understand which argument causing the issue

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,713 questions
Not Monitored
Not Monitored
Tag not monitored by Microsoft.
35,995 questions
0 comments No comments
{count} votes

Accepted answer
  1. arielman2304 676 Reputation points
    2021-04-07T09:33:22.763+00:00

    The Data Source was missing from the TargetConnectionString:

    TargetConnectionString="Data Source=TEST05,123;Integrated Security=True;Trusted_Connection=True;Persist Security Info=False;Pooling=False;MultipleActiveResultSets=False;Connect Timeout=60;Encrypt=False;TrustServerCertificate=False"
    
    0 comments No comments

0 additional answers

Sort by: Most helpful