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)
Syntax
'Declaration
<GuidAttribute("0BBF7245-57DC-45DD-804F-B337A15D1418")> _
Public Interface VCProject _
Inherits VCProjectItem
[GuidAttribute("0BBF7245-57DC-45DD-804F-B337A15D1418")]
public interface VCProject : VCProjectItem
[GuidAttribute(L"0BBF7245-57DC-45DD-804F-B337A15D1418")]
public interface class VCProject : VCProjectItem
[<GuidAttribute("0BBF7245-57DC-45DD-804F-B337A15D1418")>]
type VCProject =
interface
interface VCProjectItem
end
public interface VCProject extends VCProjectItem
The VCProject type exposes the following members.
Properties
Name | Description | |
---|---|---|
AssemblyReferenceSearchPaths | Sets or gets a list of assembly search paths. | |
Configurations | Gets the collection of configurations on the project. | |
FileEncoding | Infrastructure. Microsoft Internal Use Only. | |
FileFormat | Infrastructure. Microsoft Internal Use Only. | |
Files | Gets the collection of files on the object. | |
Filters | Gets the collection of filters (or folders) on the object. | |
GetAllowedReferencesTypes | ||
IsDirty | Infrastructure. Microsoft Internal Use Only. | |
ItemName | Gets the name of the current item in the collection. | |
Items | Gets the collection of files and top-level folders in a project or the collection of files and folders in a folder. | |
keyword | Gets or sets the collection of Dynamic Help keywords associated with a project. | |
Kind | Gets an enumeration indicating the type of object. | |
ManagedDBConnection | Infrastructure. Microsoft Internal Use Only. | |
ManagedDBProvider | Infrastructure. Microsoft Internal Use Only. | |
Name | Gets or set the name of the object. | |
Object | Provides a reference between the Visual Studio object model and the Visual C++ object model. | |
OwnerKey | Infrastructure. Microsoft Internal Use Only. | |
Parent | Gets the immediate parent object. | |
Platforms | Gets the platforms for which this project can be built. For Visual C++, this is only Win32. | |
project | Gets the VCProject associated with the object. | |
ProjectDirectory | Gets the name of the directory that contains the project file. | |
ProjectFile | Gets the name of the project file. | |
ProjectGUID | Infrastructure. Microsoft Internal Use Only. | |
References | Gets the collection of references for the selected project. | |
ReferencesConsumableByDesigners | Gets the collection of references that are consumable by designers in the active solution configuration. | |
RootNamespace | Gets the root namespace for the specified project. | |
SccAuxPath | Infrastructure. Microsoft Internal Use Only. | |
SccLocalPath | Infrastructure. Microsoft Internal Use Only. | |
SccProjectName | Infrastructure. Microsoft Internal Use Only. | |
SccProvider | Infrastructure. Microsoft Internal Use Only. | |
ShowAllFiles | Sets or gets whether to show all files in the solution explorer. | |
SupportedPlatformNames | ||
TargetFrameworkMoniker | Gets the name of the target framework. | |
TargetFrameworkVersion | Gets or sets the version of the .NET Framework that is targeted by the project. | |
ToolFiles | Gets a collection of custom build rule files. | |
VCProjectEngine | Gets a pointer to the project engine. | |
VCReferences | Gets the collection of references for the selected project. |
Top
Methods
Name | Description | |
---|---|---|
AddActiveXReference | Adds an ActiveX (COM) reference to the project. | |
AddAssemblyReference | Adds an assembly (.NET) reference to the selected project. | |
AddConfiguration | Adds a configuration to the current project. | |
AddFile | Adds a file to the current project or folder. | |
AddFilter | Adds a folder to the current project or folder. | |
AddPlatform | Adds a platform to the current project (not enabled for Visual C++). | |
AddProjectReference | Adds a project reference to the project. | |
AddRuleDefinition | Adds a rule to the project so that it is available as an IVCRulePropertyStorage. | |
AddSdkReference | ||
AddToolFile | Adds a custom build rule file to a project. | |
AddWebReference | Adds a reference to a Web Service to the project. | |
AddWinRTReference | ||
CanAddActiveXReference | Gets a value indicating whether to add the given ActiveX (COM) reference. | |
CanAddAssemblyReference | Returns whether it is okay to add the given assembly (.NET) reference. | |
CanAddFile | Returns true if the specified file can be added to the current project or filter. | |
CanAddFilter | Returns true if the specified filter can be added as a top-level filter or as a subfilter to the current filter. | |
CanAddProjectReference | Returns whether it is okay to add the given project reference | |
CanAddSdkReference | ||
CanAddWinRTReference | ||
ContainsFileEndingWith | Indicates whether there is a file name that ends with a specified string. | |
ContainsFileWithItemType | Indicates whether there is a file whose type matches a specified type. | |
GetFilesEndingWith | Retrieves a collection of file names whose trailing characters match a specified string. | |
GetFilesWithItemType | Retrieves a collection of file names whose whose type matches a specified type. | |
GetVCService | ||
IncludeHeaderFile | Adds a #include HeaderFile directive to a pre-compiled header file, or to a specified file. | |
LoadProjectOptions | Infrastructure. Microsoft Internal Use Only. | |
LoadUserFile | Loads the user option file. | |
MakeManagedDBConnection | Infrastructure. Microsoft Internal Use Only. | |
MatchName | Matches a specified name to the name of a collection item. | |
RemoveConfiguration | Removes a configuration from the current project. | |
RemoveFile | Removes a file from the current project or folder. | |
RemoveFilter | Removes a folder from the current project and any files or other folders in the folder. | |
RemovePlatform | Removes a platform from the current project (not enabled for Visual C++). | |
RemoveReference | Removes the specified reference from the project or references collection. | |
RemoveRuleDefinition | Removes a Rule definition from the project. | |
RemoveToolFile | Removes a custom build rules file from the project. | |
Save | Infrastructure. Saves the project file (.vcxproj). | |
SaveProjectOptions | Infrastructure. Microsoft Internal Use Only. | |
SaveUserFile | Saves the user option file. | |
Version | Sets or returns the major and minor version numbers of the project. |
Top
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