IVsProvideTargetedToolboxItems.AddNewTypesForNewFramework Method

Definition

Adds new types.

public:
 int AddNewTypesForNewFramework(System::String ^ szHighestExistingTFMWithSameID, System::String ^ szNewTFM, Microsoft::VisualStudio::Shell::Interop::IVsAddToolboxItems ^ pAdder);
public:
 int AddNewTypesForNewFramework(Platform::String ^ szHighestExistingTFMWithSameID, Platform::String ^ szNewTFM, Microsoft::VisualStudio::Shell::Interop::IVsAddToolboxItems ^ pAdder);
int AddNewTypesForNewFramework(std::wstring const & szHighestExistingTFMWithSameID, std::wstring const & szNewTFM, Microsoft::VisualStudio::Shell::Interop::IVsAddToolboxItems const & pAdder);
public int AddNewTypesForNewFramework (string szHighestExistingTFMWithSameID, string szNewTFM, Microsoft.VisualStudio.Shell.Interop.IVsAddToolboxItems pAdder);
abstract member AddNewTypesForNewFramework : string * string * Microsoft.VisualStudio.Shell.Interop.IVsAddToolboxItems -> int
Public Function AddNewTypesForNewFramework (szHighestExistingTFMWithSameID As String, szNewTFM As String, pAdder As IVsAddToolboxItems) As Integer

Parameters

szHighestExistingTFMWithSameID
String

[in] The highest TFM (target framework moniker) with the same ID.

szNewTFM
String

[in] The TFM for the new provider.

pAdder
IVsAddToolboxItems

[in] The IVsAddToolboxItems to use to add items to the tool box.

Returns

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.

Applies to