Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] Third Party Tools

Reply
 
Thread Tools Rating: Thread Rating: 39 votes, 5.00 average. Display Modes
  #1  
Old 02-24-2012, 12:11 AM
tikskit tikskit is online now
Registered User
 
Join Date: 11-19-2010
Posts: 3
How do I redirect MSBuild's output to file?

I need to log the output of MSBuild action to a plain text file. If a compilation fail, I will send the file by email.
If I did it in command line, I would write something like:
MSBuild project.sln >> my.log

But how do I do it using MSBuild action?
Thank you in advance!

P.S. I use 7.7 version

Last edited by tikskit; 02-24-2012 at 12:41 AM.
Reply With Quote
  #2  
Old 02-24-2012, 07:34 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,003
http://msdn.microsoft.com/en-us/libr...vs.100%29.aspx
Reply With Quote
  #3  
Old 03-07-2012, 01:24 PM
Shiamak Shiamak is online now
Registered User
 
Join Date: 02-07-2006
Posts: 84
Building with sln specific xml file

Hi,

I have my own build.xml file which works fine at the visual studio command prompt and compiles all the projects, however I would like to incorporate this in VisualBuild using MSBuild action, is it possible , if you do hve an example this will be really helpful.

Best
Reply With Quote
  #4  
Old 03-07-2012, 03:20 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,003
In the MSBuild action, specify the build.xml file in the Project file field on the Project tab, and the vcvarsall.bat file (as called by the VS Command Prompt) in the Command to run before main command field on the Advanced tab.
http://www.kinook.com/VisBuildPro/Ma...ildprojtab.htm
http://www.kinook.com/VisBuildPro/Ma...dvancedtab.htm
Reply With Quote
  #5  
Old 03-07-2012, 04:05 PM
Shiamak Shiamak is online now
Registered User
 
Join Date: 02-07-2006
Posts: 84
THanks, the build.xml i am using complies all the projects fine when used after initiating "Visual Studio 2008 Command prompt" manually but when I use the same build.xml with the MSBUILD in visualbuild (as mentioned by you earlier, I get the message that "OUTPUTDIR is not specified for one of the projects"

??
Reply With Quote
  #6  
Old 03-07-2012, 04:17 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,003
Take it in steps to ensure everything is setup the same in Visual Build.

1) Run Visual Build from the VS 2008 Command Prompt (start VisBuildPro<enter>), add a Run Program step that makes the same msbuild call as done manually (also set the Start in field to the working folder of the Command Prompt), and build.

2) Add a Set Current Dir step to set the build dir to the working folder of the command prompt, and following that, add a MSBuild step to call the build.xml (select any option or add flags as needed to match the manual msbuild call), and rebuild.

3) Add the vcvarsall.bat call to the MSBuild step as mentioned previously to avoid needing to start Visual Build from the VS 2008 Command Prompt, start Visual Build from a shortcut and build the project.
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 07:30 AM.


Copyright © 1999-2023 Kinook Software, Inc.