473,396 Members | 1,760 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

msbuild / VS integration - print msbuild messages to output window

How to print msbuild <Messageto the VS 2005 output window, from an msbuild
file that is loaded into VS?

After reading Don Boxs' "MSBuild for MAKEFILE converts" [1], I copied the
snippet, for point 2, into a text file (test.csproj) and loaded the project
into Visual Studio. That was cool, I could see the project and the code file
(f1.txt) displayed in the Solution Explorer. After building it a few times,
I wanted to see the exact order that VS executed the targets, so I added a
<Messagetag to each <Target [2]. However VS did not display the messages
to the output window as I thought.

Q. Does anyone know how to do this?
Q. Would it require creating a custom task?

Thanks, Conan

[1] - "MSBuild for MAKEFILE converts"
http://pluralsight.com/blogs/dbox/ar.../18/13377.aspx
[2] Point 2 snippet

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"
DefaultTargets="all">
<ItemGroup>
<IntermediateFile Include="f2.txt" >
<InProject>false</InProject>
</IntermediateFile>
<InputFile Include="f1.txt" />
</ItemGroup>
<Target Name="all" DependsOnTargets="t1;t2">
<Message Text="all" />
</Target>
<Target Name="clean">
<Delete Files="f3.txt;f4.txt" />
<Message Text="clean" />
</Target>
<Target Name="rebuild" DependsOnTargets="clean;all">
<Message Text="rebuild" />
</Target>
<Target Name="t1" Inputs="@(InputFile)" Outputs="f3.txt">
<Copy SourceFiles="@(InputFile)" DestinationFiles="@(IntermediateFile)"
/>
<Copy SourceFiles="@(IntermediateFile)" DestinationFiles="f3.txt" />
<Delete Files="@(IntermediateFile)" />
<Message Text="t1" />
</Target>
<Target Name="t2" Inputs="@(InputFile)" Outputs="f4.txt">
<Copy SourceFiles="@(InputFile)" DestinationFiles="f4.txt" />
<Message Text="t2" />
</Target>
</Project>
Jul 22 '06 #1
0 3543

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Benny | last post by:
I'm testing to see whether msbuild can replace nmake. project file <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Target Name="test"> <Exec Command="test.exe"/>...
2
by: minorguy | last post by:
I have a general question about MSBuild (which I know little about so far) and I hope this is the right newsgroup. I can read the reference documentation about MSBuild, but it's not really telling...
0
by: Ian Harding | last post by:
There doesn't seem to be a build or msbuild specific group, so I hope this is a suitable place to ask. If msbuild is run from a command prompt directly on a colution containing C++ project files...
3
by: jrett | last post by:
I've got a source tree with over 100 projects, some depending on others and I'd like to set this up on an automated nightly build, or where devs can do private builds of the entire source tree to...
11
by: Ed Sutton | last post by:
I was about to learn Nant when I came across some references to MSBuild. Where do I get it, or what application does MSBuild ship with? I have Visual Studio 2005 Professional. Thanks in...
3
by: Danny | last post by:
Hi I trying to master msBuild but have a problem. I have a solution that I wish to build using msbuild but want to override BeforeBuild/AfterBuild targets for each of the projects. I trying to...
1
by: gaddoz | last post by:
Hi all, I'm looking for the better build tool that integrates with VSS and VS.NET 2005. nAnt? msBuild? What are you using now?? Many Thanks Regards Matteo
3
by: =?Utf-8?B?QWJoaQ==?= | last post by:
Hi All, I need to write MSBuild script to get latest source code of solution/Projects from TFS server.I m using VS2008. I am new to this, can anyone plz help me how can i do this. Thanks...
7
by: shapper | last post by:
Hello, I am working on an ASP.MET MVC Web Application with NET 3.5 in VS 2008. I need to run some extra tasks on this project build so I download MSBuild from http://msbuildtasks.tigris.org/....
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.