Error using VisualStudio addin

Hi

I've just downloaded the trial version and have tried running the profiler through Visual Studio (2005 with .NET3.0 on XP) but I get an error saying "Exception dispatching command: Object reference not set to an instance of an object".

Can anyone help?

Many thanks
Claire

Comments

  • Hi Claire,

    We have seen this exception quite a few times and I believe I have narrowed it down to a problem in the add-in when a solution has a desktop application and a web application project in it at the same time. Can you have a look at the following URL and tell us if the suggested workaround helps?

    http://www.red-gate.com/support/kb/KB200709000151.htm

    Thanks!
  • Similar situation here, trial version, launched VS (team suite), error on startup:
    System.NullReferenceException: Object reference not set to an instance of an object.
    at _2._1()
    at _5._1(String )
    at RedGate.Profiler.VSAddin.Connect.QueryStatus(String commandName, vsCommandStatusTextWanted neededText, vsCommandStatus& status, Object& commandText)

    at Microsoft.VisualStudio.CommandBars._CommandBars.get_Item(Object Index)

    at BuildAutoIncrementAddin.BuildAutoIncrementMain.CreateVcbToolBar()

    at BuildAutoIncrementAddin.BuildAutoIncrementMain.OnConnection(Object application, ext_ConnectMode connectMode, Object addInInst, Array& custom)

    This error does not happen without ANTS installed.

    In consequence, any command invoked on ANTS results in either
    1) Exception dispatching command: The method or operation is not implemented.
    2) Exception dispatching command: Unspecified error

    Other addins installed:

    Enterprise Library Configuration Editor 3.0
    EventToaster 1.0
    Extensions for Windows WF
    IndexedFind 1.0
    Microsoft Visual Studio 2005 Team Suite - ENU Service Pack 1 (KB926601)
    OnTime VS.NET 7.0
    Security Update for Microsoft Visual Studio 2005 Team Suite - ENU (KB937061)
    SourceOutliner 1.0
    SuperDiff 1.0
    VcCodeSnippets 1.0
    Visual Assist X
    ANTS Profiler
    VSReactorAddin
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Hi,

    This is similar, but I don't believe it's exactly the same issue. We know that the profiler add-in fails in the circumstances described in the KB article, but in your case, it looks like a Visual Studio malfunction because our add-in is running a rather innocuous query for the status on the toolbar when the add-in loads and Visual Studio is coming back with something incorrect.

    I'll look into it a bit further and see if I can come up with some possible causes for this.
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    From what I can tell, some other add-in (BuildAutoIncrementAddin?) is querying the status of the ANTS Profiler add-in. The function that checks the status of the ANTS Profiler add-in expects a command name, which this other add-in is sending as a NULL value.

    Can I send an updated add-in to your email address and see if that fixes the problem?
  • sure, anytime.
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    I've just sent it.
  • No more exception on startup, but when invoking for example "Profile Namespace"...

    Exception dispatching command: The method or operation is not implemented.

    at EnvDTE.Project.get_FileName()
    at RedGate.Profiler.VSAddin.CodeModel.GetActiveProject()
    at RedGate.Profiler.VSAddin.Controller.SetupApplicationDefinition(Project project)
    at RedGate.Profiler.VSAddin.Controller.ProfileNamespaces(ArrayList namespaces, ProfilerType type)
    at RedGate.Profiler.VSAddin.Controller.DispatchCommand(String command)

    I have a solution with 11 projects, 4 unloaded. All C#, no webprojects.
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    Bit of a stumper... How can a project not have a file name? Please tell me you're not using Visual Studio 2008!
  • No, I am using VS2005, team suite. This seems to be in many ways very special, ask the guys at WholeTomato who are fighting with some weird problems in VisualAssist that occur ONLY in this edition of VS2005.
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    At least Visual Studio loads without errors now, correct? Then I can concentrate on the second problem.
  • Yes, correct. No problems loading. Just invoking any funcion of the profiler results in error.
    If you need any testing to be done, let me know.
  • Brian DonahueBrian Donahue Posts: 6,590 Bronze 1
    The update I'd sent did have a code change in the GetActiveProject method as well. It fixes the problem of having a solution with a web and a non-web project in it, but maybe I've actually introduced another problem. I'll have a look at that Monday. Thanks for your patience!
Sign In or Register to comment.