Hi!

I'm writing an add-in for VS.NET (2002, not Everett). I subscribe to the
OnBuildBegin event, and want to output some errors on the task pane while a
solution is being compiled. The tasks show up in the pane, but when I click
on a task, it won't jump to the source file's line and column.

How do I properly add tasks to the tasks pane in order to navigate from them
to the source files?
I remember that when a custom tool in VS6 should writes
        <file name>(line,column) : error message\n
then when you click on the line, the IDE jumps to the file/line/column
It works for VS.NET too, and I do output the formatted error message, but it
won't generate a build error task in the task pane, so it's useless.

I'm not in a hurry, as I do this for fun, so take your time:)

Thanks,

Stoyan

P.S.
I use the following code to add a task to the task pane:

<snippet lang="C#">
Window window = applicationObject.Windows.Item
(Constants.vsWindowKindTaskList);
TaskList taskList = (TaskList) window.Object;
taskList.TaskItems.Add (
        vsTaskCategories.vsTaskCategoryBuildCompile,
        vsTaskCategories.vsTaskCategoryUser,
        "Some Message\n",
        vsTaskPriority.vsTaskPriorityHigh,
        vsTaskIcon.vsTaskIconCompile,
        false,
        fileName,
        ((CodeElement) att.Parent).StartPoint.Line, // ignore this...
        false,
        true);
</snippet>

===================================
This list is hosted by DevelopMentor�  http://www.develop.com
You may be interested in Guerrilla .NET, 24 March 2003, in London and Boston
http://www.develop.com/courses/gdotnet

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to