i have triggered a build definition and build succeeded, the build definition is assigned the following parameters which i want to do some auto deploy stuff:
/p:DeployOnBuild=True
/p:Configuration=Debug
/p:SkipExtraFilesOnServer=true
/p:DeployTarget=MSDeployPublish
/p:MSDeployPublishMethod=RemoteAgent
/p:AllowUntrustedCertificate=True
/p:CreatePackageOnPublish=true
/p:DeployIISAppPath=BlueOffice/BlueOfficeService /*site/application*/
/p:MsDeployServiceUrl=http://10.1.1.4
/p:username=mobiledomain\tfsbuild2
/p:password=Abcd1234!
but when the build finished, the deployment not be done, anything about project or build definition i should notice to modify?thanks in advance!
Related
I am migrating a few solutions into azure devops and want to use the MSBuild Task to build them.
The are currently build using devenv with the following commands:
devenv.com file.vcxproj /rebuild "unittest debug" /project project_name
I thought I would try with
msbuild.exe file.vcxproj /p:Project=project_name /p:configuration="unittest debug"
But I am getting the error that the project does not contains the "unittest debug"
I would appreaciate any help I could get.
Thanks for reading,
The devenv command line you are using doesn't make complete sense.
file.vcxproj is a C++ project. If it were a solution, e.g. somesolution.sln, then the /project switch would make sense, e.g. if somesolution.sln included file.vcxproj then the following command would build file.vcxproj.
devenv.com somesolution.sln /project file
Solutions and projects have a 'configuration' and a 'platform'. "unittest debug" looks like an attempt to specify this information but the syntax is not correct. The correct syntax is
<configuration>|<platform>
The default configuratuion values are Debug and Release.
I suspect that
"unittest debug"
should be
"debug|unittest".
The original devenv command line can probably be rewritten as
devenv.com file.vcxproj /rebuild "debug|unittest"
The MSBuild equivalent is
msbuild.exe file.vcxproj /t:rebuild /p:configuration=debug;platform=unittest
The /build, /clean, and /rebuild switches on devenv map to MSBuild targets in the C++ project. The C++ project also expects configuration and platform as separate properties.
I have installed Msbuild along with studio2017 but while building sonarscanner the msbuild.exe not found error thrown.
I was a newbie, a little bit knowledge of visual studio, msbuild and scripting.
I was assigned to a task, to create an automation script for building project using MSbuild and the project has three different configuration and I need to build it sequentially because some projects depend on the output dlls of the other configuration, when building the first configuration it succeed but when I reach the second and third configuration it failed. Because reference DLLs were not copied on the ouput bin of selected configuration causing it to missing assembly reference on some projects. And, the thing is I can't edit the projects, it was only for me to view.
Any help on how could I successfully build it.
My script looks like this:
& $msbuild ($master_sln) /t:Clean /p:Configuration=FirstConfiguration /p:Platform="Any CPU"
& $msbuild ($master_sln) /t:Rebuild /p:Configuration=FirstConfiguration /p:Platform="Any CPU"
& $msbuild ($master_sln) /t:Build /p:Configuration="SecondConfiguration" /p:Platform="Any CPU" /p:BuildProjectReferences=false
& $msbuild ($master_sln) /t:Build /p:Configuration="ThirdConfiguration" /p:Platform="Any CPU" /p:BuildProjectReferences=false
I am running this msbuild scriplet from command line (other details ommited)
<MSBuild Projects ="#(ProjectsToBuild)"
ContinueOnError ="false"
Properties="Configuration=$(Configuration)">
How can I hide its output if I don't have any errors on compile ?
There are no parameters that you can add to a specific target in msbuild to get it to build without any command output. But you could wrap the call in a second target, then call the target by executing msbuild and using the /noconsolelogger flag:
<Exec Command="MSBuild $(MSBuildProjectDirectory)\$(MsBuildThisFile) /t:TargetToExecute /nologo /noconsolelogger"/>
msbuild output (mostly) comes from Logger objects. These objects are extensible; you can supply your own implementation, or you can use any of the built-in loggers.
If you're seeing console output from msbuild, you're seeing output from the built-in console logger. You can turn off the console logger using the /noconsolelogger command-line option.
Even with that option set, you'll still see a couple of lines of output: the startup message that includes the program name and the copyright message. You can suppress that output with the /nologo option.
I'm trying to build a c# solution in msysgit (Windows) using the same build command that I would with msbuild:
"C:/Windows/Microsoft.NET/Framework/v4.0.30319/msbuild.exe" /p:Configuration=Debug /p:OutDir="c:\projects\proudly\build" "src/Proudly.Identity.sln"
With msbuild, the output of the build goes into my /build folder and all is well. Now, when I run the same command with Mono's xbuild, like this:
"C:/Program Files (x86)/Mono/lib/mono/xbuild/12.0/bin/xbuild.exe" /p:Configuration=Debug /p:OutDir="c:\projects\proudly\build" "src/Proudly.Identity.sln"
...and my the build output goes into the /bin/Debug folder of each project instead of my build folder.
I was under the impression that xbuild can be using just like msbuild. Any clue what I'm doing wrong?