IVsProvideTargetedToolboxItems.AddNewTypesForNewFramework Method

Adds new types.

Namespace:  Microsoft.VisualStudio.Shell.Interop
Assembly:  Microsoft.VisualStudio.Shell.Interop.10.0 (in Microsoft.VisualStudio.Shell.Interop.10.0.dll)

Syntax

'Declaration
Function AddNewTypesForNewFramework ( _
    szHighestExistingTFMWithSameID As String, _
    szNewTFM As String, _
    pAdder As IVsAddToolboxItems _
) As Integer
int AddNewTypesForNewFramework(
    string szHighestExistingTFMWithSameID,
    string szNewTFM,
    IVsAddToolboxItems pAdder
)
int AddNewTypesForNewFramework(
    [InAttribute] String^ szHighestExistingTFMWithSameID, 
    [InAttribute] String^ szNewTFM, 
    [InAttribute] IVsAddToolboxItems^ pAdder
)
abstract AddNewTypesForNewFramework : 
        szHighestExistingTFMWithSameID:string * 
        szNewTFM:string * 
        pAdder:IVsAddToolboxItems -> int 
function AddNewTypesForNewFramework(
    szHighestExistingTFMWithSameID : String, 
    szNewTFM : String, 
    pAdder : IVsAddToolboxItems
) : int

Parameters

  • szHighestExistingTFMWithSameID
    Type: System.String
    [in] The highest TFM (target framework moniker) with the same ID.
  • szNewTFM
    Type: System.String
    [in] The TFM for the new provider.

Return Value

Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

This method is called by the toolbox when the active designer belongs to a project that targets a framework which the toolbox has never seen before (ignoring profile differences) and whose version is greater than that of any framework with the same ID that the toolbox has seen before. The toolbox calls on each package identified as an item provider by an existing toolbox. The item should determine the set of new types added between szHighestExistingTFMWithSameID and szNewTFM, and add toolbox items for those types using pAdder. If the toolbox has not yet seen any framework with the same ID as the new framework, szHighestExistingTFMWithSameID will be an empty string.

This method must set the type name and assembly name metadata on the items it adds. It is not necessary to set the item provider GUID, as that will be set automatically.

.NET Framework Security

See Also

Reference

IVsProvideTargetedToolboxItems Interface

Microsoft.VisualStudio.Shell.Interop Namespace