
Signature
Best regards,
Carlos J. Quintero
MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com
Thanks Carlos.
I've managed to do this, and this is what I use with VS2003 to report
compilation errors. Unfortunately, in VS2005 this adds a task to the task
list under the "Add-ins and Macros" category, but does not show it as an
error.
In VS2005 I believe I need to get access to some Add method for the
ErrorList object, but I haven't found out how yet. Please help!
Fabrice
> Once you get the EnvDTE.Window object (I assume that you know this part),
> Window.Object returns an object that, depending on the window, you can
[quoted text clipped - 7 lines]
>>
>> Fabrice
Carlos J. Quintero [VB MVP] - 22 Nov 2005 14:59 GMT
I think that it is not possible to add errors to the list using an add-in in
VS 2005. The collection lacks an Add method. You can submit a suggestion to
add it in the next version:
http://lab.msdn.microsoft.com/ProductFeedback/

Signature
Best regards,
Carlos J. Quintero
MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com
> Thanks Carlos.
> I've managed to do this, and this is what I use with VS2003 to report
[quoted text clipped - 5 lines]
>
> Fabrice
"Ed Dore [MSFT]" - 28 Nov 2005 17:59 GMT
Hi Frabrice,
To add items to the error list, you'll need to construct an
ErrorListProvider that implements the IVsTaskProvider interface, as well as
a class that implements IVsErrorItem, as documented in the Visual Studio
SDK for VS 2005. The Managed Package Framework contains some classes that
do all the heavy lifting for you.
In particular the ErrorListProvider and ErrorTask classes in the
Microsoft.VisualStudio.Shell.dll assembly. I have a simple toolwindow
package created with the Visual Studio SDK, that illustrates how to use
these classes to add error items to the Error List dialog. I suspect you
can readily use the same technique from an addin, by referencing the
appropriate MPF assemblies, and retrieving the IServiceProvider interface
from the DTE object.
If you're interested, feel free to drop me an email (just remove that
'.online' from my email address), and I'll zip up and send along the actual
package I wrote that uses these classes. The package in question implements
a toolwindow that you can add errors from, and also handles the ErrorTask's
Navigate event, which reactivates my toolwindow and selects the appropriate
element in a .net listbox that corresponds to the error added to the Error
List.
Sincerely,
Ed Dore [MSFT]
This post is "AS IS" with no warranties, and confers no rights.
bosske - 26 Nov 2007 10:42 GMT
hi,
I am trying to make something similar in VS Orcas and I would like to see
that example if its possible?
>Hi Frabrice,
>
[quoted text clipped - 24 lines]
>
>This post is "AS IS" with no warranties, and confers no rights.
weiwoo - 10 Dec 2007 06:29 GMT
Nice to meet you.
I have the same problem with creating ErrorTask by ErrorListProvider.
Would you like to sent your hint source to me too?
thank you advanced.
It's so loon time from this thread has been written.
I Bless Good Luck.
yours weiwoo.
>Hi Frabrice,
>
[quoted text clipped - 24 lines]
>
>This post is "AS IS" with no warranties, and confers no rights.
weiwoo - 10 Dec 2007 07:38 GMT
I made it!
Thank you all.
My source writted with Visual Basic .Net is flowing.
---------------------------
Dim IServiceProvider As New ServiceProvider(CType
(_applicationObject.DTE, Microsoft.VisualStudio.OLE.Interop.IServiceProvider))
Dim ErrorListProvider As New ErrorListProvider
(IServiceProvider)
Dim task As New Microsoft.VisualStudio.Shell.ErrorTask
task.Text = "Special Error"
ErrorListProvider.Tasks.Add(task)
ErrorListProvider.Show()
---------------------------
>Nice to meet you.
>
[quoted text clipped - 12 lines]
>>
>>This post is "AS IS" with no warranties, and confers no rights.