How to run long msbuild command in groovy file in windows slave

  groovy, jenkins-pipeline, msbuild, windows

I have the below msbuild deploy command which is working local:

msbuild "Database ServicesDatabase Services.sqlproj" /t:deploy /p:TargetConnectionString="Data Source=TEST,111;Integrated Security=True;Persist Security Info=False;Pooling=False;MultipleActiveResultSets=False;Connect Timeout=60;Encrypt=False;TrustServerCertificate=False" /p:BlockOnPossibleDataLoss=False /p:TargetDatabase="test_db"

what is correct syntax to run it in jenkisfile.groovy?
I’m running against my windows machine, so I guess it should start with bat "msbuild ......."

I tried many syntax but they all failed

Source: Windows Questions

LEAVE A COMMENT