Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

VCAssemblyReference Interface 

Represents a reference to a .NET assembly.

Namespace: Microsoft.VisualStudio.VCProjectEngine
Assembly: Microsoft.VisualStudio.VCProjectEngine (in microsoft.visualstudio.vcprojectengine.dll)

[GuidAttribute("238B5179-2429-11D7-8BF6-00B0D03DAA06")] 
public interface VCAssemblyReference : VCReference
/** @attribute GuidAttribute("238B5179-2429-11D7-8BF6-00B0D03DAA06") */ 
public interface VCAssemblyReference extends VCReference
GuidAttribute("238B5179-2429-11D7-8BF6-00B0D03DAA06") 
public interface VCAssemblyReference extends VCReference

See Setting Visual C++ 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:
© 2015 Microsoft