Hi
I have used Jenkins for a long time but am now using the MSBuild plugin for the first time, because we are migrating some build jobs from VC2008 to VC2010.
I have added a ‘MSBuild installation’ in Jenkins with the following path:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
In my job, I specify the following MSBuild command line arguments:
p:Configuration="My_release" /p:useenv=true /flp:logfile=MyOutput.log;verbosity=diagnostic
When I run the job I get this error:
error TRK0005: Failed to locate: "CL.exe". The system cannot find the file specified.
Visual C++ 2010 is installed on the build machine and CL.exe is definitely present.
I guess that MSBuild would typically be executed from a Visual Studio command prompt which would have the environment variables correctly set up.
Do I need to configure the path when running the MSBuild plugin from Jenkins?
Best regards
David
Hi,
Did you set up MSBuild configuration globally?
I mean, go to Manage Jenkinsà Configure System , you need to add which version of MSBuild you going to use.
Try above and let us know whether it solved your problem or not.
--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
jenkinsci-use...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
Hi
Thanks for your reply.
Yes, I had already done that.
David
Click here to report this email as spam.
Can you provide configuration settings for your job , if possible?
And what are the steps you are adding for MSBuild?
I think there is not much to say.
The master configuration sets the MSBuild path to:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe
The build step is:
MS Build file: MSVC\MyProj.sln
Command line arguments: /p:Configuration=" release" /p:useenv=true /flp:logfile=MyOutput.log;verbosity=diagnostic
Sorry David, but it is hard to understand your problem.
I am giving my code snippet so you can compare and check the difference.
Jenkins Job:
Execute windows batch command
C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe /t:Rebuild /p:Configuration=%BuildType% /p:Platform="%BuildPlatform%" /verbosity:normal %workspace%MyProj.sln
And check whether you have set up environment variables on your build server. E.g. C:\winodws\system32
Do you use the MSBuild plugin or just specify a ‘Windows batch command’ build step?
Does your path variable on your slave include:
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN;
?
I set MSBuild.exe at configure system location and for my jobs , I just use the command ‘Execute Batch Command” and write my query.
It works for me so far.
From: "Dhrutib...@wellsfargo.com" <Dhrutib...@wellsfargo.com>
To: jenkins...@googlegroups.com
Sent: Wednesday, September 4, 2013 9:42 AM
Hi Mark
Thanks for your reply.
I have found this issue:
https://issues.jenkins-ci.org/browse/JENKINS-16452
where you have also discussed this.
Given that we run Jenkins as a Windows service, and given that it is not possible to run vcvarsall.bat in conjunction with the MSBuild plugin from Jenkins, I think it is best for us to use a ‘Windows batch command’ build step in the Jenkins job and call vcvarsall.bat and MSBuild.exe explicitly there.
It seems to me that the MSBuild plugin is not very useful because of this.
BR
David
FWIW, We build for both VS 2008 and VS 2010. I have taken the contents of the vcvarsall.bat file and made it a Properties file on the master. Then I use “Prepare an environment for the run” and set the “Properties File Path” to $JENKINS_HOME\usercontent\vs2010env.properties and click “load script and properties file form the master” and the environment is all setup for using the MSBuild build step.
Hi
Thanks for your suggestion. I’m not familiar with properties files but will have a look.
David
Hi Dick
Do I need a particular plugin in order to use property files as you described?
David
From: jenkins...@googlegroups.com [mailto:jenkins...@googlegroups.com] On Behalf Of Ginga, Dick
Sent: 05 September 2013 13:10
Yup, Environment Injector Plugin