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

From: [email protected] 
[mailto:[email protected]] On Behalf Of Mark Waite
Sent: 05 September 2013 02:45
To: [email protected]
Subject: Re: Help needed with MsBuild plugin

Isn't the message "error TRK0005: Failed to locate: "CL.exe". The system cannot 
find the file specified. " an indication that you may have failed to call 
vcvarsall.bat for your specific Visual Studio before starting the Jenkins slave 
agent on that machine?

I thought that Visual Studio used that technique to allow users to install 
multiple Visual Studio versions on a single machine, and then select which 
Visual Studio they want to use for a command line compile by invoking the 
corresponding vcvarsall.bat script for that Visual Studio version.

I don't think the MSBuild plugin is the right one to decide which Visual Studio 
version you want to run, though I guess it could be extended to have some form 
of list of alternative Visual Studio versions which it should attempt to 
configure before running the build.

Mark Waite

________________________________
From: "[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
To: [email protected]<mailto:[email protected]>
Sent: Wednesday, September 4, 2013 9:42 AM
Subject: RE: Help needed with MsBuild plugin

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: [email protected]<mailto:[email protected]> 
[mailto:[email protected]] On Behalf Of David Aldrich
Sent: Wednesday, September 04, 2013 8:23 AM
To: [email protected]<mailto:[email protected]>
Subject: RE: Help needed with MsBuild plugin

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;

?

From: [email protected]<mailto:[email protected]> 
[mailto:[email protected]] On Behalf Of 
[email protected]<mailto:[email protected]>
Sent: 04 September 2013 16:14
To: [email protected]<mailto:[email protected]>
Subject: RE: Help needed with MsBuild plugin

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


From: [email protected]<mailto:[email protected]> 
[mailto:[email protected]] On Behalf Of David Aldrich
Sent: Wednesday, September 04, 2013 8:07 AM
To: [email protected]<mailto:[email protected]>
Subject: RE: Help needed with MsBuild plugin

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

David

From: [email protected]<mailto:[email protected]> 
[mailto:[email protected]] On Behalf Of 
[email protected]<mailto:[email protected]>
Sent: 04 September 2013 15:54
To: [email protected]<mailto:[email protected]>
Subject: RE: Help needed with MsBuild plugin

Can you provide configuration settings for your job , if possible?
And what are the steps you are adding for MSBuild?

From: [email protected]<mailto:[email protected]> 
[mailto:[email protected]] On Behalf Of David Aldrich
Sent: Wednesday, September 04, 2013 7:49 AM
To: [email protected]<mailto:[email protected]>
Subject: RE: Help needed with MsBuild plugin

Hi

Thanks for your reply.

Yes, I had already done that.

David


From: [email protected]<mailto:[email protected]> 
[mailto:[email protected]] On Behalf Of 
[email protected]<mailto:[email protected]>
Sent: 04 September 2013 15:41
To: [email protected]<mailto:[email protected]>
Subject: RE: Help needed with MsBuild plugin

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.

From: [email protected]<mailto:[email protected]> 
[mailto:[email protected]] On Behalf Of David Aldrich
Sent: Wednesday, September 04, 2013 4:28 AM
To: [email protected]<mailto:[email protected]>
Subject: Help needed with MsBuild plugin

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

--
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 
[email protected]<mailto:[email protected]>.
For more options, visit https://groups.google.com/groups/opt_out.

Click 
here<https://www.mailcontrol.com/sr/szJBvIn6!BrGX2PQPOmvUv46NwAC7+vkNuaJfGCF!6bqywAqgIaj3FrSOpIPaCACXdIc+sLA36AX!sYT9IPN0A==>
 to report this email as spam.
--
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 
[email protected]<mailto:[email protected]>.
For more options, visit https://groups.google.com/groups/opt_out.
--
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 
[email protected]<mailto:[email protected]>.
For more options, visit https://groups.google.com/groups/opt_out.
--
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 
[email protected]<mailto:[email protected]>.
For more options, visit https://groups.google.com/groups/opt_out.
--
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 
[email protected]<mailto:[email protected]>.
For more options, visit https://groups.google.com/groups/opt_out.
--
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 
[email protected]<mailto:[email protected]>.
For more options, visit https://groups.google.com/groups/opt_out.
--
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 
[email protected]<mailto:[email protected]>.
For more options, visit https://groups.google.com/groups/opt_out.
--
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 
[email protected]<mailto:[email protected]>.
For more options, visit https://groups.google.com/groups/opt_out.

--
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 
[email protected]<mailto:[email protected]>.
For more options, visit https://groups.google.com/groups/opt_out.

-- 
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to