This documentation is archived and is not being maintained.

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 _
HRESULT __stdcall get_UniqueIdentifier(
   /* [out, retval] */ BSTR* retVal
HRESULT __stdcall put_UniqueIdentifier(
   /* [in] */ BSTR NewValue
public string UniqueIdentifier {get; set;}
[JScript .NET]
public function get UniqueIdentifier() : String
public function set UniqueIdentifier(
   NewValue : String


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.


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)
            filter.UniqueIdentifier = "xx"
    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