Compartir a través de


IVsSharedMSBuildFilesManagerHierarchy2.EnumAllAvailableSharedProjects Method

Definition

Returns an enumerable collection of all Shared Projects that exist in the Solution.

public:
 Microsoft::VisualStudio::Shell::Interop::IVsEnumSharedProjectReferences ^ EnumAllAvailableSharedProjects(Microsoft::VisualStudio::Shell::Interop::IVsHierarchy ^ ReferencingProject);
public:
 Microsoft::VisualStudio::Shell::Interop::IVsEnumSharedProjectReferences ^ EnumAllAvailableSharedProjects(Microsoft::VisualStudio::Shell::Interop::IVsHierarchy ^ ReferencingProject);
Microsoft::VisualStudio::Shell::Interop::IVsEnumSharedProjectReferences EnumAllAvailableSharedProjects(Microsoft::VisualStudio::Shell::Interop::IVsHierarchy const & ReferencingProject);
public Microsoft.VisualStudio.Shell.Interop.IVsEnumSharedProjectReferences EnumAllAvailableSharedProjects (Microsoft.VisualStudio.Shell.Interop.IVsHierarchy ReferencingProject);
abstract member EnumAllAvailableSharedProjects : Microsoft.VisualStudio.Shell.Interop.IVsHierarchy -> Microsoft.VisualStudio.Shell.Interop.IVsEnumSharedProjectReferences
Public Function EnumAllAvailableSharedProjects (ReferencingProject As IVsHierarchy) As IVsEnumSharedProjectReferences

Parameters

ReferencingProject
IVsHierarchy

The IVsHierarchy of a project that may be referencing a Shared Project (i.e. importing the shared project file owned by the Shared Project).If a referencingProject is provided, then the information of whether that project is already referencing the Shared Project will be provided.

Returns

The shared project references..

Remarks

Shared Projects (aka Shared Assets Projects) are loaded projects that are considered to be the owner of a shared MSBuild project file (e.g. *.projitems) that can be imported by multiple client (or “Head") projects. Shared Projects register their shared MSBuild file with the IVsSharedMSBuildFilesManagerHierarchy using the SFUSEROPT_SharedMSBuildFileOwnerProject flag. There should normally be only one project that registers as the "SharedMSBuildFileOwnerProject" of a shared MSBuild file in the Solution. In this case this project is the assigned OwnerProject. In the rare event that more than one project registers with the "SharedMSBuildFileOwnerProject" flag for the same shared MSBuild file, then if only one of these project is loaded (i.e. all of the others are unloaded), then the single, LOADED project would be assigned as the OwnerProject.

Applies to