IVsProvideTargetedToolboxItems::AddNewTypesForNewFramework Method (String^, String^, IVsAddToolboxItems^)

 

Adds new types.

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

int AddNewTypesForNewFramework(
	String^ szHighestExistingTFMWithSameID,
	String^ szNewTFM,
	IVsAddToolboxItems^ pAdder
)

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.

pAdder
Type: Microsoft.VisualStudio.Shell.Interop::IVsAddToolboxItems^

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

Return Value

Type: System::Int32

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

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.

Return to top
Show: