IPersistXMLFragment Interface

Used to persist non-build related data in free-form XML.

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


<InterfaceTypeAttribute()> _
<GuidAttribute("6B0C8632-6F01-4E54-9645-FFE82A2F4FE9")> _
Public Interface IPersistXMLFragment
Dim instance As IPersistXMLFragment
public interface IPersistXMLFragment
public interface class IPersistXMLFragment
public interface IPersistXMLFragment


IPersistXMLFragment can be implemented on both the main project subtype aggregator object and the project subtype configuration objects. The base project calls the main project subtype aggregator object to load or save configuration independent data. The base project can also call on the project subtype configuration objects to load or save configuration dependent data.

Base project calls IPersistXMLFragment methods for each aggregation level by passing the GUID for each level. The base project then passes or receives the XML fragment dedicated for the particular project subtype. In a common case the project subtype implementation intercepts its own GUID after the base project passes it, and handles the call and forwards all other calls to inner project subtypes (with their particular GUIDs). The project subtype may also decide to modify the data it passes to the inner subtypes before or after the call to IPersistXMLFragment.

The base project maintains a collection of XML nodes attributed with the project subtype GUID and configuration type under the ProjectExtensions \ VisualStudio node in the Microsoft Build Engine (MSBuild) XML tree.

An example of XML data dedicated for a particular project subtype can be similar to the example scenario below.



    <FlavorData= "GUID_Flavor">

      {Flavor debug data}




Notes to Implementers:

Implement IPersistXMLFragment to enable the persistence of non-build related data in the project files by project subtypes.

See Also


IPersistXMLFragment Members

Microsoft.VisualStudio.Shell.Interop Namespace