Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8987711
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T21:51:33+00:00 2026-06-15T21:51:33+00:00

I have Win7 64 bits, Visual Studio 2010, and I have developed an Addin

  • 0

I have Win7 64 bits, Visual Studio 2010, and I have developed an Addin for Vs2010.

I try show messages in Error List Windows VS.
I use ErrorListProvider in OnBuildProjConfigDone build event for Addin

this._buildEvents.OnBuildProjConfigDone += new _dispBuildEvents_OnBuildProjConfigDoneEventHandler(_buildEvents_OnBuildProjConfigDone);

I get this error InvalidOperationException

The service ‘Microsoft.VisualStudio.Shell.Interop.IVsTaskList’ must be
installed for this feature to work. Ensure that this service is
available.

Connect

 public partial class Connect : IDTExtensibility2, IDTCommandTarget, System.Windows.Forms.IWin32Window, IOleCommandTarget

OnBuildProjConfigDone

void _buildEvents_OnBuildProjConfigDone(string project, string projectConfig, string platform, string solutionConfig, bool success)
{

// Omitted
 if (!resul)
 {
                project.DTE.ExecuteCommand("Build.Cancel");

                var errorListHelper = new ErrorListHelper();
                ErrorListProvider errorProvider = errorListHelper.GetErrorListProvider();
                var newError = new ErrorTask();
                newError.ErrorCategory = TaskErrorCategory.Message;
                newError.Category = TaskCategory.BuildCompile;
                newError.Text = "Cualquier mensaje de error aqui";
                errorProvider.Tasks.Add(newError);
 }
}      

ErrorListHelper

public class ErrorListHelper : System.IServiceProvider
{
    public ErrorListProvider GetErrorListProvider()
    {
        ErrorListProvider provider = new ErrorListProvider(this);
        provider.ProviderName = "Provider";
        provider.ProviderGuid = System.Guid.NewGuid();
        return provider;
    }

    public object GetService(Type serviceType)
    {
        return Package.GetGlobalService(serviceType);
    }
}

Suggestion by @JohnL: I put a breakpoint in my GetService method and Package.GetGlobalService is returning null.

Any suggestions?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T21:51:34+00:00Added an answer on June 15, 2026 at 9:51 pm

    Ryan Molden (MSFT) says:

    Package.GetGlobalService is relying on at least one MPF package (from
    the specific version of MPF you are referencing) having been loaded.
    Since you yourself are an AddIn not a Package you can’t guarantee that
    in any way.

    You should pass something like new
    ServiceProvider((Microsoft.VisualStudio.OLE.Interop.IServiceProvider))) as the argument to ErrorListProvide

    Package.GetGlobalService is returning null.

    I use this code in my Addin. I test it and I get not error, and I can show errors and warnings in ErrorList Windows VS. I’ll testing more for safely.

     public partial class Connect
        {
            ErrorListProvider _errorListProvider = null;
    
            void CreateErrorListProvider()
            {
                if (_errorListProvider == null)
                {
                    System.IServiceProvider serviceProvider = new ServiceProvider(_applicationObject as Microsoft.VisualStudio.OLE.Interop.IServiceProvider);
                    _errorListProvider = new ErrorListProvider(serviceProvider);
                    _errorListProvider.ProviderName = "custom Errors";
                    _errorListProvider.ProviderGuid = new Guid("xxxxxxxxxxxxxx");
    
                }
            }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a very large C++ server application on Windows (Win7). It compiles fine
i have made a program in vc++ 2010 in win7 but since the submission
I'm looking to have vista/win7 use Aero-style windows while XP users use normal window
I have VS2008 and VS2010 on brand new Win7. Can I install VS2005 afterwards
I have VS2010 on my dev machine (Win7) and I run a virtual machine
I have a Win7-64 bit OS I have MS Office 2010 32-bit installed I
I have a C app (VStudio 2010, win7 64bit) running on a machine with
I have Tomcat 6.0 installation on my Win7 PC. I used 64/32bit windows installation.
I have an application that I developed/tested under 32bit Win ( XP and Win7
So, I have a simple linq query. Other programmers (all on Win7, VS2010) can

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.