VCFilter.SourceControlFiles Property

Definition

Gets or sets a value indicating whether files added to the filter are automatically placed under source code control.

public:
 property bool SourceControlFiles { bool get(); void set(bool value); };
public:
 property bool SourceControlFiles { bool get(); void set(bool value); };
[System.Runtime.InteropServices.DispId(2357)]
public bool SourceControlFiles { [System.Runtime.InteropServices.DispId(2357)] get; [System.Runtime.InteropServices.DispId(2357)] set; }
[<System.Runtime.InteropServices.DispId(2357)>]
[<get: System.Runtime.InteropServices.DispId(2357)>]
[<set: System.Runtime.InteropServices.DispId(2357)>]
member this.SourceControlFiles : bool with get, set
Public Property SourceControlFiles As Boolean

Property Value

true if files are placed under source code control; otherwise, false.

Attributes

Examples

The following example uses SourceControlFiles in the integrated development environment (IDE):

' Macro code.  
' add reference to Microsoft.VisualStudio.VCProjectEngine  
Imports EnvDTE  
Imports Microsoft.VisualStudio.VCProjectEngine  

Public Module Module1  
    Sub Test()  
        Dim mycollection As IVCCollection  
        Dim filter As VCFilter  
        Dim prj As VCProject  
        prj = DTE.Solution.Projects.Item(1).Object  
        mycollection = prj.Filters  
        ' mycollection.Count has count of files  
        filter = mycollection.Item(1)  
        MsgBox(filter.SourceControlFiles)  
    End Sub  
End Module  

Remarks

By default, all files added to a project under source code control are expected to be automatically added to source code control as well. An exception would be when you want to add generated files, such as the .c files generated by MIDL, to the project to get them built during a build. Such generated files do not belong under source code control.

See How to: Compile Example Code for Project Model Extensibility for information about how to compile and run this example.

Applies to