Using AddBuildProjectNode, how to show the link for log file
-
Tuesday, September 13, 2011 1:40 PM
Hi,
I'm using AddBuildProjectNode, to display some custom information, under the build project node, along with other projects that were built.
But, the 'View LogFile' is disabled, is there any overloaded method where I could pass some custom log file for this?
Thanks.
-Varshant
All Replies
-
Thursday, September 15, 2011 5:40 AMModerator
Hi VarShant,
Thanks for your post.
In order to resolve this issue, I want to confirm some information with you:
1 How did you use the AddBuildProjectNode to display your custom information, could you share the detailed information here?
2 You said the ‘View LogFile’ is disabled, how can I reproduce this scenario?
If you want to custom Build Information, please refer to this blog(part 1 and 2): http://blogs.msdn.com/b/patcarna/archive/2009/11/17/tfs-2010-customizing-build-information.aspx.
And refer to this blog: http://blogs.msdn.com/b/jpricket/archive/2009/12/21/tfs-2010-displaying-custom-build-information-in-visual-studio.aspx and http://www.ewaldhofman.nl/post/2010/05/28/Customize-Team-Build-2010-e28093-Part-8-Send-information-to-the-build-log.aspx.
For how to use AddBuildProjectNode, you can refer to this TFS API example: http://blogs.microsoft.co.il/blogs/shair/archive/2011/05/18/tfs-api-part-37-create-builds.aspx.
John Qiao [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.

-
Friday, September 16, 2011 7:05 AM
Thanks for the links.
I've used the above links to create a seperate build project node.
Here is a sample snippet in code activity:
IActivityTracking currentTracking = context.GetExtension<IBuildLoggingExtension>().GetActivityTracking(context);
IBuildInformationNode childNode = currentTracking.Node.Children.CreateNode();
childNode.Type = currentTracking.Node.Type;
childNode.Children.AddBuildProjectNode("Release", @"C:\Builds\11\******\******\****\Source\Common\Common.sln", "Any CPU", "$/****/Dev/Source/****/Com*****.sln", DateTime.Now, null);
Note: Few details above are masked for privacy.
Using the above snippet, I can see a record in the list of projects built in Summary section, but the 'View Log' hyperlink is disabled.
-Varshant -
Friday, September 16, 2011 11:05 AMModerator
Hi Varshant,
Thanks for your reply.
If you want to custom the View Summary section, please refer to the example in this blog: http://blogs.msdn.com/b/jpricket/archive/2010/08/09/tfs2010-customizing-the-build-details-view-summary-view.aspx.
If you want to send information in View Log section, I suggest you use the code snippet in Ewald’s blog: http://www.ewaldhofman.nl/post/2010/05/28/Customize-Team-Build-2010-e28093-Part-8-Send-information-to-the-build-log.aspx.
John Qiao [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.

-
Friday, September 16, 2011 11:38 AM
Ok. These are the links which I've already reviewed but no info in these to resolve this issue.
For your understand, below is the screenshot of the error.
Note: Few project details have been masked, for privacy.
I would like to know how to enable to 'View Log File' link and which file it is expecting.
-Varshant- Edited by VarShant Friday, September 16, 2011 11:39 AM typo
-
Friday, September 16, 2011 12:26 PMModerator
Hi Varshant,
Thanks for your reply.
If you want to build two configurations in one Build Definition, please refer to the following steps:
1 Edit Solutions and Configurations in Build Definition:

2 Queue Build Definition:

John Qiao [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.

-
Friday, September 16, 2011 12:53 PM
No John.
The issue is not with Configuration & Platform options.
Here is the scenario: For suppose, I would like to build my project using DevEnv compiler. so, for this I've used Invoke Process activity and pointed to DevEnv.exe to use it.
This has processed successfully, and now I would like to show the DevEnv project in my list of projects built.
For this I've used the code snippet provided.
Let me know if you have any samples adding a project details using AddBuildProjectNode.
Thanks.
-Varshant -
Friday, October 21, 2011 7:54 AM
Still waiting for the resolution of this issue.
Please let me know if you need further details, if any.
-Varshant -
Thursday, September 13, 2012 10:14 AM
IActivityTracking currentTracking = context.GetExtension<IBuildLoggingExtension>().GetActivityTracking(context);
IBuildInformationNode childNode = currentTracking.Node.Children.CreateNode();
childNode.Type = currentTracking.Node.Type;
childNode.Children.AddBuildProjectNode("Release", @"C:\Builds\11\******\******\****\Source\Common\Common.sln", "Any CPU", "$/****/Dev/Source/****/Com*****.sln", DateTime.Now, null);
Note: Few details above are masked for privacy.
Using the above snippet, I can see a record in the list of projects built in Summary section, but the 'View Log' hyperlink is disabled.
-VarshantIt seems you can do:
IActivityTracking currentTracking = context.GetExtension<IBuildLoggingExtension>().GetActivityTracking(context);
IBuildInformationNode childNode = currentTracking.Node.Children.CreateNode();
childNode.Type = currentTracking.Node.Type;
var buildProjectNode = childNode.Children.AddBuildProjectNode("Release", @"C:\Builds\11\******\******\****\Source\Common\Common.sln", "Any CPU", "$/****/Dev/Source/****/Com*****.sln", DateTime.Now, null);
buildProjectNode.Node.Children.AddExternalLink("[Link text is only shown in log view]", new Uri(logFilePath));

