AppManifest.Clear Method (2003 System)

Removes the contents of the application manifest.

Namespace:  Microsoft.VisualStudio.Tools.Applications.Runtime
Assembly:  Microsoft.VisualStudio.Tools.Applications.Runtime (in Microsoft.VisualStudio.Tools.Applications.Runtime.dll)

Syntax

'Declaration
Public Sub Clear
'Usage
Dim instance As AppManifest

instance.Clear()
public void Clear()

Remarks

This method sets the Dependency and Identity properties to nulla null reference (Nothing in Visual Basic), and removes all of the entry points from the EntryPoints property.

For example, the following example is the application manifest for a Microsoft Office Excel solution document before calling the Clear method.

<assembly xmlns="urn:schemas-microsoft-com:asm.v1" 
 xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" manifestVersion="1.0">
    <assemblyIdentity name="ExcelSample1.manifest" version="1.0.0.0" /> 
    <asmv2:entryPoint name="Startup" dependencyName="dependency0">
        <asmv2:clrClassInvocation class="ExcelSample1.ThisWorkbook" /> 
    </asmv2:entryPoint>
    <asmv2:entryPoint name="Startup" dependencyName="dependency0">
        <asmv2:clrClassInvocation class="ExcelSample1.Sheet1" /> 
    </asmv2:entryPoint>
    <asmv2:entryPoint name="Startup" dependencyName="dependency0">
        <asmv2:clrClassInvocation class="ExcelSample1.Sheet2" /> 
    </asmv2:entryPoint>
    <asmv2:entryPoint name="Startup" dependencyName="dependency0">
        <asmv2:clrClassInvocation class="ExcelSample1.Sheet3" /> 
    </asmv2:entryPoint>
    <asmv2:dependency asmv2:name="dependency0">
        <asmv2:dependentAssembly>
            <assemblyIdentity name="ExcelSample1"
             version="1.0.1832.29909" /> 
        </asmv2:dependentAssembly>
        <asmv2:installFrom codebase="ExcelSample1.dll" /> 
    </asmv2:dependency>
</assembly>

After calling the Clear method, the same application manifest has the following contents.

<assembly xmlns="urn:schemas-microsoft-com:asm.v1" 
xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" manifestVersion="1.0" />

Permissions

See Also

Reference

AppManifest Class

AppManifest Members

Microsoft.VisualStudio.Tools.Applications.Runtime Namespace