Reference2.Remove Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Removes the reference from the References object that contains it.
public:
void Remove();
public:
void Remove();
void Remove();
[System.Runtime.InteropServices.DispId(4)]
public void Remove ();
[<System.Runtime.InteropServices.DispId(4)>]
abstract member Remove : unit -> unit
Public Sub Remove ()
Implements
- Attributes
Examples
' Macro Editor
Imports VSLangProj
Public Sub TestReport()
' First project is a Visual Basic or C# project.
Dim vsProject As VSProject = _
CType(DTE.Solution.Projects.Item(1).Object, VSProject)
' Add an assembly and display its type, "Assembly".
Dim newRef As Reference
newRef = vsProject.References.Add("C:\SomeProject\bin\template.dll")
newRef.Remove()
End Sub