arielma
arielma

Reputation: 1398

msbuild deploy command fails with exception

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

Upvotes: 1

Views: 72

Answers (1)

arielma
arielma

Reputation: 1398

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"

Upvotes: 1

Related Questions