Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

VCProject Interface

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

Namespace:  Microsoft.VisualStudio.VCProjectEngine
Assembly:  Microsoft.VisualStudio.VCProjectEngine (in Microsoft.VisualStudio.VCProjectEngine.dll)

[GuidAttribute(L"0BBF7245-57DC-45DD-804F-B337A15D1418")]
public interface class VCProject : VCProjectItem

The VCProject type exposes the following members.

  NameDescription
Public propertyAssemblyReferenceSearchPathsSets or gets a list of assembly search paths.
Public propertyConfigurationsGets the collection of configurations on the project.
Public propertyFileEncodingInfrastructure. Microsoft Internal Use Only.
Public propertyFileFormatInfrastructure. Microsoft Internal Use Only.
Public propertyFilesGets the collection of files on the object.
Public propertyFiltersGets the collection of filters (or folders) on the object.
Public propertyGetAllowedReferencesTypes
Public propertyIsDirtyInfrastructure. Microsoft Internal Use Only.
Public propertyItemNameGets the name of the current item in the collection.
Public propertyItemsGets the collection of files and top-level folders in a project or the collection of files and folders in a folder.
Public propertykeywordGets or sets the collection of Dynamic Help keywords associated with a project.
Public propertyKindGets an enumeration indicating the type of object.
Public propertyManagedDBConnectionInfrastructure. Microsoft Internal Use Only.
Public propertyManagedDBProviderInfrastructure. Microsoft Internal Use Only.
Public propertyNameGets or set the name of the object.
Public propertyObjectProvides a reference between the Visual Studio object model and the Visual C++ object model.
Public propertyOwnerKeyInfrastructure. Microsoft Internal Use Only.
Public propertyParentGets the immediate parent object.
Public propertyPlatformsGets the platforms for which this project can be built. For Visual C++, this is only Win32.
Public propertyprojectGets the VCProject associated with the object.
Public propertyProjectDirectoryGets the name of the directory that contains the project file.
Public propertyProjectFileGets the name of the project file.
Public propertyProjectGUIDInfrastructure. Microsoft Internal Use Only.
Public propertyReferencesGets the collection of references for the selected project.
Public propertyReferencesConsumableByDesignersGets the collection of references that are consumable by designers in the active solution configuration.
Public propertyRootNamespaceGets the root namespace for the specified project.
Public propertySccAuxPathInfrastructure. Microsoft Internal Use Only.
Public propertySccLocalPathInfrastructure. Microsoft Internal Use Only.
Public propertySccProjectNameInfrastructure. Microsoft Internal Use Only.
Public propertySccProviderInfrastructure. Microsoft Internal Use Only.
Public propertyShowAllFilesSets or gets whether to show all files in the solution explorer.
Public propertySupportedPlatformNames
Public propertyTargetFrameworkMonikerGets the name of the target framework.
Public propertyTargetFrameworkVersionGets or sets the version of the .NET Framework that is targeted by the project.
Public propertyToolFilesGets a collection of custom build rule files.
Public propertyVCProjectEngineGets a pointer to the project engine.
Public propertyVCReferencesGets the collection of references for the selected project.
Top

  NameDescription
Public methodAddActiveXReferenceAdds an ActiveX (COM) reference to the project.
Public methodAddAssemblyReferenceAdds an assembly (.NET) reference to the selected project.
Public methodAddConfigurationAdds a configuration to the current project.
Public methodAddFileAdds a file to the current project or folder.
Public methodAddFilterAdds a folder to the current project or folder.
Public methodAddPlatformAdds a platform to the current project (not enabled for Visual C++).
Public methodAddProjectReferenceAdds a project reference to the project.
Public methodAddRuleDefinitionAdds a rule to the project so that it is available as an IVCRulePropertyStorage.
Public methodAddSdkReference
Public methodAddToolFileAdds a custom build rule file to a project.
Public methodAddWebReferenceAdds a reference to a Web Service to the project.
Public methodAddWinRTReference
Public methodCanAddActiveXReferenceGets a value indicating whether to add the given ActiveX (COM) reference.
Public methodCanAddAssemblyReferenceReturns whether it is okay to add the given assembly (.NET) reference.
Public methodCanAddFileReturns true if the specified file can be added to the current project or filter.
Public methodCanAddFilterReturns true if the specified filter can be added as a top-level filter or as a subfilter to the current filter.
Public methodCanAddProjectReferenceReturns whether it is okay to add the given project reference
Public methodCanAddSdkReference
Public methodCanAddWinRTReference
Public methodContainsFileEndingWithIndicates whether there is a file name that ends with a specified string.
Public methodContainsFileWithItemTypeIndicates whether there is a file whose type matches a specified type.
Public methodGetFilesEndingWithRetrieves a collection of file names whose trailing characters match a specified string.
Public methodGetFilesWithItemTypeRetrieves a collection of file names whose whose type matches a specified type.
Public methodGetVCService
Public methodIncludeHeaderFileAdds a #include HeaderFile directive to a pre-compiled header file, or to a specified file.
Public methodLoadProjectOptionsInfrastructure. Microsoft Internal Use Only.
Public methodLoadUserFileLoads the user option file.
Public methodMakeManagedDBConnectionInfrastructure. Microsoft Internal Use Only.
Public methodMatchNameMatches a specified name to the name of a collection item.
Public methodRemoveConfigurationRemoves a configuration from the current project.
Public methodRemoveFileRemoves a file from the current project or folder.
Public methodRemoveFilterRemoves a folder from the current project and any files or other folders in the folder.
Public methodRemovePlatformRemoves a platform from the current project (not enabled for Visual C++).
Public methodRemoveReferenceRemoves the specified reference from the project or references collection.
Public methodRemoveRuleDefinitionRemoves a Rule definition from the project.
Public methodRemoveToolFileRemoves a custom build rules file from the project.
Public methodSaveInfrastructure. Saves the project file (.vcxproj).
Public methodSaveProjectOptionsInfrastructure. Microsoft Internal Use Only.
Public methodSaveUserFileSaves the user option file.
Public methodVersionSets or returns the major and minor version numbers of the project.
Top

' 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
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft