question

arielman2304-0180 avatar image
0 Votes"
arielman2304-0180 asked arielman2304-0180 edited

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

sql-server-generalvs-msbuild
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

arielman2304-0180 avatar image
0 Votes"
arielman2304-0180 answered arielman2304-0180 edited

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"
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.