Export (0) Print
Expand All
Expand Minimize

UniqueIdentifier Property

Visual Studio .NET 2003

Specifies a nonlocalizable name for the folder.

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

Remarks

UniqueIdentifier is typically used by wizards to place items in specific folders regardless of the project folder language. One example of such a folder is the Generated Files folder created for nonattributed ATL projects.

Example

The following sample code uses UniqueIdentifier in the development environment:

' add reference to Microsoft.VisualStudio.VCProjectEngine
Imports EnvDTE
Imports Microsoft.VisualStudio.VCProjectEngine
Public Module Module1
    Sub Test()
        Dim idx As Integer
        Dim filter As VCFilter
        Dim col As IVCCollection
        Dim prj, prj2 As VCProject
        prj = DTE.Solution.Projects.Item(1).Object
        col = prj.Filters
        For idx = 1 To col.Count
            filter = col.Item(idx)
            MsgBox(filter.UniqueIdentifier)
            filter.UniqueIdentifier = "xx"
            MsgBox(filter.UniqueIdentifier)
        Next
    End Sub
End Module

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

See Also

Applies To: VCFilter Object

Show:
© 2015 Microsoft