VCAssemblyReference Interface
Represents a reference to a .NET assembly.
Namespace: Microsoft.VisualStudio.VCProjectEngine
Assembly: Microsoft.VisualStudio.VCProjectEngine (in Microsoft.VisualStudio.VCProjectEngine.dll)
Syntax
'Declaration
<GuidAttribute("BBD5E771-EA8A-4665-817A-E79BA9AB77BD")> _
Public Interface VCAssemblyReference _
Inherits VCReference
[GuidAttribute("BBD5E771-EA8A-4665-817A-E79BA9AB77BD")]
public interface VCAssemblyReference : VCReference
[GuidAttribute(L"BBD5E771-EA8A-4665-817A-E79BA9AB77BD")]
public interface class VCAssemblyReference : VCReference
[<GuidAttribute("BBD5E771-EA8A-4665-817A-E79BA9AB77BD")>]
type VCAssemblyReference =
interface
interface VCReference
end
public interface VCAssemblyReference extends VCReference
The VCAssemblyReference type exposes the following members.
Properties
Name | Description | |
---|---|---|
AssemblyName | Gets the name of the assembly. The assembly name is a short, friendly name for an assembly. The assembly name, assembly version, originator key, and locale are used by the common language runtime to uniquely identify an assembly during binding. | |
BuildNumber | Gets the build number of the referenced assembly. | |
CopyLocal | Gets or sets a value indicating whether to automatically copy the reference to the target directory. | |
CopyLocalDependencies | Gets or sets a value indicating whether to automatically copy the referenced assembly's non-system dependencies to the target location during a build. | |
CopyLocalSatelliteAssemblies | Gets or sets a value indicating whether to automatically copy the referenced assembly's satellite assemblies to the target location during a build. | |
Culture | Gets the culture for the selected reference. | |
Description | Gets or sets a string that represents the description for the object or the use of the output group. | |
FullPath | Gets the full path of the project file. | |
Identity | Gets the identity of the referenced assembly. | |
ItemName | Gets the name of the current item in the collection. | |
Kind | Gets an enumeration indicating the type of object. | |
Label | Gets the display name of the referenced assembly. | |
majorVersion | Gets the major version of the referenced assembly. | |
MinFrameworkVersion | Gets the minimum version of the .NET Framework required by the project. | |
minorVersion | Gets the minor version of the referenced assembly. | |
Name | Gets or sets the name of the object. | |
Parent | Gets the immediate parent object of a given object. | |
project | Gets the generic Project object associated with the Visual Basic or Visual C# project. This property is read-only. | |
PublicKeyToken | Gets the public key token for the referenced assembly. | |
Reference | Gets the associated reference. | |
RelativePath | Gets or sets the path to the selected reference, relative to the project directory. | |
RevisionNumber | Gets the revision number of the selected reference. | |
StrongName | Gets a value indicating whether or not the selected reference has a strong name. | |
SubType | Gets or sets the file's subtype as understood by the designers. | |
UseDependenciesInBuild | Gets or sets a value indicating whether this assembly's dependencies are used in the build process. | |
UseInBuild | Gets or sets a value indicating whether this assembly is used in the build process. | |
VCProjectEngine | Gets a pointer to the project engine. | |
VCReferences | Gets the collection of references for the selected project. | |
Version | Gets the version of the selected reference. |
Top
Methods
Name | Description | |
---|---|---|
MatchName | Matches a specified name to the name of a collection item. | |
Remove | Removes the specified project from the solution. |
Top
Remarks
See Working with Project Properties for information about accessing a project's property pages dialog box.
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