Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

Namespace Property (VCProjectEngine)

Visual Studio .NET 2003

Sets or returns an object defining the parent namespace.

[Visual Basic .NET]
Public Property Namespace() As String
[Visual Basic 6]
Property Get Namespace() As String
Property Let Namespace( _
   ByVal NewValue As String _
HRESULT __stdcall get_Namespace(
   /* [out, retval] */ BSTR* retVal
HRESULT __stdcall put_Namespace(
   /* [in] */ BSTR NewValue
public string Namespace {get; set;}
[JScript .NET]
public function get Namespace() : String
public function set Namespace(
   NewValue : String


A string specifying the name of the namespace.

Return Value

A string specifying the name of the namespace.


Namespace must match the root namespace of the project.

In many cases, the value of Namespace is the same as the name of the library that you are wrapping.


' Add a reference to Microsoft.VisualStudio.VCProjectEngine and have a 
' Visual C++ .NET project loaded before running this example.
Imports EnvDTE
Imports Microsoft.VisualStudio.VCProjectEngine
Public Module Module1
    Sub Test()
        Dim prj As VCProject
        Dim cfgs, tools As IVCCollection
        Dim cfg As VCConfiguration
        Dim tool As VCManagedWrapperGeneratorTool
        prj = DTE.Solution.Projects.Item(1).Object
        cfgs = prj.Configurations
        cfg = cfgs.Item(1)
        tool = cfg.Tools("VCManagedWrapperGeneratorTool")
        MsgBox("Current namespace : " & _
    End Sub
End Module

See Samples for Project Model Extensibility for information on how to compile and run this sample.

See Also

Applies To: VCManagedWrapperGeneratorTool Object | VCWebServiceProxyGeneratorTool Object

© 2015 Microsoft