Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

ErrorListProvider in VS2010 throws InvalidOperationException about IVsTaskList

$
0
0
I'm trying to hook into the ErrorListProvider in VS2010 to provide some more feedback from my VS2010 extension addin.
The code is as follows:

            try
            {
                ErrorListProvider errorProvider = new ErrorListProvider(ServiceProvider);
                ErrorTask error = new ErrorTask();
                error.Category = TaskCategory.BuildCompile;
                error.Text = "ERROR!";
                errorProvider.Tasks.Add(error);
            }
            catch (InvalidOperationException)
            { }

However the following exception is thrown:

System.InvalidOperationException was caught
   Message=The service 'Microsoft.VisualStudio.Shell.Interop.IVsTaskList' must be installed   for this feature to work.  Ensure that this service is available.
  Source=Microsoft.VisualStudio.Shell.10.0
  StackTrace:
       at Microsoft.VisualStudio.Shell.TaskProvider.get_VsTaskList()
       at Microsoft.VisualStudio.Shell.TaskProvider.Refresh()
       at Microsoft.VisualStudio.Shell.TaskProvider.TaskCollection.Add(Task task)


Does anyone have any ideas why?

Thanks

Ben

Ben - Blog[http://blog.benhall.me.uk]

Viewing all articles
Browse latest Browse all 4410

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>