IVsSharedProjectReferencesHelper::ChangeSharedMSBuildFileImports Method (IVsHierarchy^, Array^, Array^, String^)
Changes the set of Shared MSBuild files imported by a project.
Assembly: Microsoft.VisualStudio.Shell.Interop.14.0.DesignTime (in Microsoft.VisualStudio.Shell.Interop.14.0.DesignTime.dll)
bool ChangeSharedMSBuildFileImports(
IVsHierarchy^ importingProject,
Array^ importFullPathsToRemove,
Array^ importFullPathsToAdd,
String^ szImportLabel
)
Parameters
- importingProject
-
Type:
Microsoft.VisualStudio.Shell.Interop::IVsHierarchy^
The project that is being modified.
- importFullPathsToRemove
-
Type:
System::Array^
A list of MSBuild project file full paths (e.g. *.projitems) that should be removed from being imported.
- importFullPathsToAdd
-
Type:
System::Array^
A list of MSBuild project file full paths (e.g. *.projitems) that should be added as imports.
- szImportLabel
-
Type:
System::String^
The label used to identify the MSBuild import statements of interest (e.g. Shared Project References use import statements with the label = "Shared").
This method may cause the importingProject 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. If any errors occur, then no changes will be committed to the project file on disk.