locked
what is the applicable interface for Constants? RRS feed

  • Question

  • I want to do the following in the OnConnection method of an addin. ( I want to get a reference to the "debugger locals" EnvDTE.Window )

        public void OnConnection(
          object InAppl, ext_ConnectMode InConnectMode,
          object InAddinInst, ref Array InCustom)
        {
          DTE2 dte = (DTE2)InAppl;
    
          var localsWin = dte.Windows.Item(Constants.vsWindowKindLocals);
        }
    

    but the error says: "interop type EnvDTE.Constants cannot be embedded. Use the applicable interface instead"

    What is the application interface to use?

    Sunday, February 12, 2012 6:41 PM

Answers

  • There is no applicable interface. You either need to set EmbedInterop to false on the dll containing the complained about type or simply define the constant value in your own assembly and not use Comstants.

    Ryan

    • Marked as answer by Steve Richter Sunday, February 12, 2012 6:56 PM
    Sunday, February 12, 2012 6:47 PM