Project.Imports Property
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.
All the files that during evaluation contributed to this project, as ProjectRootElements, with the ProjectImportElement that caused them to be imported. This does not include projects that were never imported because a condition on an Import element was false. The outer ProjectRootElement that maps to this project itself is not included.
public:
property System::Collections::Generic::IList<Microsoft::Build::Evaluation::ResolvedImport> ^ Imports { System::Collections::Generic::IList<Microsoft::Build::Evaluation::ResolvedImport> ^ get(); };
public System.Collections.Generic.IList<Microsoft.Build.Evaluation.ResolvedImport> Imports { get; }
member this.Imports : System.Collections.Generic.IList<Microsoft.Build.Evaluation.ResolvedImport>
Public ReadOnly Property Imports As IList(Of ResolvedImport)
Property Value
A list of all the files that contributed to the evaluation of this project.
The name of each item is the Import element that caused the file to be imported. The value of each item is the project root of the imported project. Import elements whose Condition attribute evaluated to false are not included.
Remarks
This can be used by the host to figure out what projects might be impacted by a change to a particular file. It could also be used, for example, to find the .user file, and use its ProjectRootElement to modify properties in it.