Export (0) Print
Expand All

VCAssemblyReference Interface

Represents a reference to a .NET assembly.

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

[GuidAttribute("BBD5E771-EA8A-4665-817A-E79BA9AB77BD")]
public interface VCAssemblyReference : VCReference

The VCAssemblyReference type exposes the following members.

  NameDescription
Public propertyAssemblyNameGets 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.
Public propertyBuildNumberGets the build number of the referenced assembly.
Public propertyCopyLocalGets or sets a value indicating whether to automatically copy the reference to the target directory.
Public propertyCopyLocalDependenciesGets or sets a value indicating whether to automatically copy the referenced assembly's non-system dependencies to the target location during a build.
Public propertyCopyLocalSatelliteAssembliesGets or sets a value indicating whether to automatically copy the referenced assembly's satellite assemblies to the target location during a build.
Public propertyCultureGets the culture for the selected reference.
Public propertyDescriptionGets or sets a string that represents the description for the object or the use of the output group.
Public propertyFullPathGets the full path of the project file.
Public propertyIdentityGets the identity of the referenced assembly.
Public propertyItemNameGets the name of the current item in the collection.
Public propertyKindGets an enumeration indicating the type of object.
Public propertyLabelGets the display name of the referenced assembly.
Public propertymajorVersionGets the major version of the referenced assembly.
Public propertyMinFrameworkVersionGets the minimum version of the .NET Framework required by the project.
Public propertyminorVersionGets the minor version of the referenced assembly.
Public propertyNameGets or sets the name of the object.
Public propertyParentGets the immediate parent object of a given object.
Public propertyprojectGets the generic Project object associated with the Visual Basic or Visual C# project. This property is read-only.
Public propertyPublicKeyTokenGets the public key token for the referenced assembly.
Public propertyReferenceGets the associated reference.
Public propertyRelativePathGets or sets the path to the selected reference, relative to the project directory.
Public propertyRevisionNumberGets the revision number of the selected reference.
Public propertyStrongNameGets a value indicating whether or not the selected reference has a strong name.
Public propertySubTypeGets or sets the file's subtype as understood by the designers.
Public propertyUseDependenciesInBuildGets or sets a value indicating whether this assembly's dependencies are used in the build process.
Public propertyUseInBuildGets or sets a value indicating whether this assembly is used in the build process.
Public propertyVCProjectEngineGets a pointer to the project engine.
Public propertyVCReferencesGets the collection of references for the selected project.
Public propertyVersionGets the version of the selected reference.
Top

  NameDescription
Public methodMatchNameMatches a specified name to the name of a collection item.
Public methodRemoveRemoves the specified project from the solution.
Top

See Working with Project Properties for information about accessing a project's property pages dialog box.

' 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
Show:
© 2014 Microsoft