IVsSharedProjectReferencesHelper.ChangeSharedProjectReferences Method

Definition

Changes the set of Shared Projects referenced by a project.

public:
 bool ChangeSharedProjectReferences(Microsoft::VisualStudio::Shell::Interop::IVsHierarchy ^ ReferencingProject, int cReferencesToRemove, cli::array <System::Object ^> ^ referencesToRemove, int cReferencesToAdd, cli::array <System::Object ^> ^ referencesToAdd);
public:
 bool ChangeSharedProjectReferences(Microsoft::VisualStudio::Shell::Interop::IVsHierarchy ^ ReferencingProject, int cReferencesToRemove, Platform::Array <Platform::Object ^> ^ referencesToRemove, int cReferencesToAdd, Platform::Array <Platform::Object ^> ^ referencesToAdd);
bool ChangeSharedProjectReferences(Microsoft::VisualStudio::Shell::Interop::IVsHierarchy const & ReferencingProject, int cReferencesToRemove, std::Array <winrt::Windows::Foundation::IInspectable const &> const & referencesToRemove, int cReferencesToAdd, std::Array <winrt::Windows::Foundation::IInspectable const &> const & referencesToAdd);
public bool ChangeSharedProjectReferences (Microsoft.VisualStudio.Shell.Interop.IVsHierarchy ReferencingProject, int cReferencesToRemove, object[] referencesToRemove, int cReferencesToAdd, object[] referencesToAdd);
abstract member ChangeSharedProjectReferences : Microsoft.VisualStudio.Shell.Interop.IVsHierarchy * int * obj[] * int * obj[] -> bool
Public Function ChangeSharedProjectReferences (ReferencingProject As IVsHierarchy, cReferencesToRemove As Integer, referencesToRemove As Object(), cReferencesToAdd As Integer, referencesToAdd As Object()) As Boolean

Parameters

ReferencingProject
IVsHierarchy

The project that is using the AddReferenceManager dialog to add SharedProject references.

cReferencesToRemove
Int32

The numberof SharedProject References to be removed.

referencesToRemove
Object[]

An array of SharedProject references to be removed. Each element of the array is expected to support IVsSharedProjectReference or IVsHierarchy interface.May be null if there are no references to be removed.

cReferencesToAdd
Int32

The number of SharedProject References to be added.

referencesToAdd
Object[]

An array of SharedProject references to be added. Each element of the array is expected to support IVsSharedProjectReference or IVsHierarchy interface. May be null if there are no references to be added.

Returns

True if project has been reloaded, false if not.

Remarks

This method is often used by projects as an implementation detail of their IVsReferenceManagerUserReloadRequired::ApplyReloadRequiredReferenceChanges implementation. This method may cause the referencingProject to be reloaded as part of this operation. If this method returns true that the project was reloaded, then the caller must get the project again by calling IVsSolution.GetProjectOfGuid or similar mechanism after this method returns. Shared Project References use MSBuild import statements that are tagged with the label "Shared".

Applies to