VCProject VCProject VCProject Interface

Definition

This object exposes the properties on a Visual C++ project.

[System.Runtime.InteropServices.Guid("DBF177F2-06DB-4A47-8AAD-C8E12BFD6C86")]
[System.Runtime.InteropServices.TypeLibType(System.Runtime.InteropServices.TypeLibTypeFlags.FDual | System.Runtime.InteropServices.TypeLibTypeFlags.FDispatchable)]
public interface VCProject : Microsoft.VisualStudio.VCProjectEngine.VCProjectItem
type VCProject = interface
    interface VCProjectItem
Public Interface VCProject
Implements VCProjectItem
Attributes
Implements

Examples

' Add a reference to Microsoft.VisualStudio.VCProjectEngine and have a   
' Visual C++ project loaded before running this example.  
Imports EnvDTE  
Imports Microsoft.VisualStudio.VCProjectEngine  
Public Module Module1  
    Sub Test()  
        Dim prj As VCProject  
        Dim vcar As VCAssemblyReference  
        Dim refcfg As VCReferenceConfiguration  

        prj = DTE.Solution.Projects.Item(1).Object  
        If prj.CanAddAssemblyReference("C:\Program Files\ _  
        Microsoft Visual Studio 8\Common7\IDE\ _  
        PublicAssemblies\envdte.dll") Then  
           vcar = prj.AddAssemblyReference("C:\Program Files\ _  
           Microsoft Visual Studio 8\Common7\IDE\ _  
           PublicAssemblies\envdte.dll")  
        End If  
        refcfg = vcar.ReferenceConfigurations.Item(1)  
        MsgBox("Consumable? " & refcfg.ConsumableByDesigner)  
    End Sub  
End Module  

Properties

ActiveConfiguration ActiveConfiguration ActiveConfiguration
AssemblyReferenceSearchPaths AssemblyReferenceSearchPaths AssemblyReferenceSearchPaths

Sets or gets a list of assembly search paths.

Capabilities Capabilities Capabilities
Configurations Configurations Configurations

Gets the collection of configurations on the project.

FileEncoding FileEncoding FileEncoding

Microsoft Internal Use Only.

FileFormat FileFormat FileFormat

Microsoft Internal Use Only.

Files Files Files

Gets the collection of files on the object.

Filters Filters Filters

Gets the collection of filters (or folders) on the object.

GetAllowedReferencesTypes GetAllowedReferencesTypes GetAllowedReferencesTypes
IsDirty IsDirty IsDirty

Microsoft Internal Use Only.

ItemName ItemName ItemName

Gets the name of the current item in the collection.

Items Items Items

Gets the collection of files and top-level folders in a project or the collection of files and folders in a folder.

keyword keyword keyword

Gets or sets the collection of Dynamic Help keywords associated with a project.

Kind Kind Kind

Gets an enumeration indicating the type of object.

LatestTargetPlatformVersion LatestTargetPlatformVersion LatestTargetPlatformVersion
ManagedDBConnection ManagedDBConnection ManagedDBConnection

Microsoft Internal Use Only.

ManagedDBProvider ManagedDBProvider ManagedDBProvider

Microsoft Internal Use Only.

Name Name Name

Gets or set the name of the object.

Object Object Object

Provides a reference between the Visual Studio object model and the Visual C++ object model.

OwnerKey OwnerKey OwnerKey

Microsoft Internal Use Only.

Parent Parent Parent

Gets the immediate parent object.

Platforms Platforms Platforms

Gets the platforms for which this project can be built. For Visual C++, this is only Win32.

project project project

Gets the VCProject associated with the object.

ProjectDirectory ProjectDirectory ProjectDirectory

Gets the name of the directory that contains the project file.

ProjectFile ProjectFile ProjectFile

Gets the name of the project file.

ProjectGUID ProjectGUID ProjectGUID

Microsoft Internal Use Only.

References References References

Gets the collection of references for the selected project.

ReferencesConsumableByDesigners ReferencesConsumableByDesigners ReferencesConsumableByDesigners

Gets the collection of references that are consumable by designers in the active solution configuration.

RootNamespace RootNamespace RootNamespace

Gets the root namespace for the specified project.

SccAuxPath SccAuxPath SccAuxPath

Microsoft Internal Use Only.

SccLocalPath SccLocalPath SccLocalPath

Microsoft Internal Use Only.

SccProjectName SccProjectName SccProjectName

Microsoft Internal Use Only.

SccProvider SccProvider SccProvider

Microsoft Internal Use Only.

ShowAllFiles ShowAllFiles ShowAllFiles

Sets or gets whether to show all files in the solution explorer.

SupportedPlatformNames SupportedPlatformNames SupportedPlatformNames
TargetFrameworkMoniker TargetFrameworkMoniker TargetFrameworkMoniker

Gets the name of the target framework.

TargetFrameworkVersion TargetFrameworkVersion TargetFrameworkVersion

Gets or sets the version of the .NET Framework that is targeted by the project.

ToolFiles ToolFiles ToolFiles

Gets a collection of custom build rule files.

VCProjectEngine VCProjectEngine VCProjectEngine

Gets a pointer to the project engine.

VCReferences VCReferences VCReferences

Gets the collection of references for the selected project.

Methods

AddActiveXReference(String, Int32, Int32, Int32, String) AddActiveXReference(String, Int32, Int32, Int32, String) AddActiveXReference(String, Int32, Int32, Int32, String)

Adds an ActiveX (COM) reference to the project.

AddAssemblyReference(String) AddAssemblyReference(String) AddAssemblyReference(String)

Adds an assembly (.NET) reference to the selected project.

AddConfiguration(String) AddConfiguration(String) AddConfiguration(String)

Adds a configuration to the current project.

AddFile(String) AddFile(String) AddFile(String)

Adds a file to the current project or folder.

AddFilter(String) AddFilter(String) AddFilter(String)

Adds a folder to the current project or folder.

AddPlatform(String) AddPlatform(String) AddPlatform(String)

Adds a platform to the current project (not enabled for Visual C++).

AddProjectReference(Object) AddProjectReference(Object) AddProjectReference(Object)

Adds a project reference to the project.

AddRuleDefinition(String, String, Boolean) AddRuleDefinition(String, String, Boolean) AddRuleDefinition(String, String, Boolean)

Adds a rule to the project so that it is available as an IVCRulePropertyStorage.

AddSdkReference(String) AddSdkReference(String) AddSdkReference(String)
AddToolFile(VCToolFile) AddToolFile(VCToolFile) AddToolFile(VCToolFile)

Adds a custom build rule file to a project.

AddWebReference(String, String) AddWebReference(String, String) AddWebReference(String, String)

Adds a reference to a Web Service to the project.

AddWinRTReference(String) AddWinRTReference(String) AddWinRTReference(String)
CanAddActiveXReference(String, Int32, Int32, Int32, String) CanAddActiveXReference(String, Int32, Int32, Int32, String) CanAddActiveXReference(String, Int32, Int32, Int32, String)

Gets a value indicating whether to add the given ActiveX (COM) reference.

CanAddAssemblyReference(String) CanAddAssemblyReference(String) CanAddAssemblyReference(String)

Returns whether it is okay to add the given assembly (.NET) reference.

CanAddFile(String) CanAddFile(String) CanAddFile(String)

Returns true if the specified file can be added to the current project or filter.

CanAddFilter(String) CanAddFilter(String) CanAddFilter(String)

Returns true if the specified filter can be added as a top-level filter or as a subfilter to the current filter.

CanAddProjectReference(Object) CanAddProjectReference(Object) CanAddProjectReference(Object)

Returns whether it is okay to add the given project reference

CanAddSdkReference(String) CanAddSdkReference(String) CanAddSdkReference(String)
CanAddWinRTReference(String) CanAddWinRTReference(String) CanAddWinRTReference(String)
ContainsFileEndingWith(String) ContainsFileEndingWith(String) ContainsFileEndingWith(String)

Indicates whether there is a file name that ends with a specified string.

ContainsFileWithItemType(String) ContainsFileWithItemType(String) ContainsFileWithItemType(String)

Indicates whether there is a file whose type matches a specified type.

FindFile(String) FindFile(String) FindFile(String)
GetFilesEndingWith(String) GetFilesEndingWith(String) GetFilesEndingWith(String)

Retrieves a collection of file names whose trailing characters match a specified string.

GetFilesWithItemType(String) GetFilesWithItemType(String) GetFilesWithItemType(String)

Retrieves a collection of file names whose whose type matches a specified type.

GetVCService(Guid) GetVCService(Guid) GetVCService(Guid)
IncludeHeaderFile(String, String) IncludeHeaderFile(String, String) IncludeHeaderFile(String, String)

Adds a #include HeaderFile directive to a pre-compiled header file, or to a specified file.

IsCapabilityPresent(String) IsCapabilityPresent(String) IsCapabilityPresent(String)
LoadProjectOptions(Object) LoadProjectOptions(Object) LoadProjectOptions(Object)

Microsoft Internal Use Only.

LoadUserFile() LoadUserFile() LoadUserFile()

Loads the user option file.

MakeManagedDBConnection(Boolean) MakeManagedDBConnection(Boolean) MakeManagedDBConnection(Boolean)

Microsoft Internal Use Only.

MatchName(String, Boolean) MatchName(String, Boolean) MatchName(String, Boolean)

Matches a specified name to the name of a collection item.

RemoveConfiguration(Object) RemoveConfiguration(Object) RemoveConfiguration(Object)

Removes a configuration from the current project.

RemoveFile(Object) RemoveFile(Object) RemoveFile(Object)

Removes a file from the current project or folder.

RemoveFilter(Object) RemoveFilter(Object) RemoveFilter(Object)

Removes a folder from the current project and any files or other folders in the folder.

RemovePlatform(Object) RemovePlatform(Object) RemovePlatform(Object)

Removes a platform from the current project (not enabled for Visual C++).

RemoveReference(Object) RemoveReference(Object) RemoveReference(Object)

Removes the specified reference from the project or references collection.

RemoveRuleDefinition(String) RemoveRuleDefinition(String) RemoveRuleDefinition(String)

Removes a Rule definition from the project.

RemoveToolFile(VCToolFile) RemoveToolFile(VCToolFile) RemoveToolFile(VCToolFile)

Removes a custom build rules file from the project.

Save() Save() Save()

Saves the project file (.vcxproj).

SaveProjectOptions(Object) SaveProjectOptions(Object) SaveProjectOptions(Object)

Microsoft Internal Use Only.

SaveUserFile() SaveUserFile() SaveUserFile()

Saves the user option file.

Version(Int32, Int32) Version(Int32, Int32) Version(Int32, Int32)

Sets or returns the major and minor version numbers of the project.

Applies to