1

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

2
  • Have you tried starting the TargetConnectionString with Server=? Commented Apr 7, 2021 at 9:27
  • problem solved. I will post the answer Commented Apr 7, 2021 at 9:30

1 Answer 1

1

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"
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.