127 references to ProjectLoadSettings
Microsoft.Build (78)
BackEnd\BuildManager\BuildManager.cs (5)
1934ProjectLoadSettings projectLoadSettings = _buildParameters!.ProjectLoadSettings; 1937projectLoadSettings |= ProjectLoadSettings.IgnoreMissingImports | ProjectLoadSettings.IgnoreInvalidImports | ProjectLoadSettings.IgnoreEmptyImports; 1942projectLoadSettings |= ProjectLoadSettings.FailOnUnresolvedSdk;
BackEnd\BuildManager\BuildParameters.cs (3)
222private ProjectLoadSettings _projectLoadSettings = ProjectLoadSettings.Default; 770public ProjectLoadSettings ProjectLoadSettings
BackEnd\Components\SdkResolution\MainNodeSdkResolverService.cs (2)
76bool failOnUnresolvedSdk = !Host.BuildParameters.ProjectLoadSettings.HasFlag(ProjectLoadSettings.IgnoreMissingImports) || Host.BuildParameters.ProjectLoadSettings.HasFlag(ProjectLoadSettings.FailOnUnresolvedSdk);
BackEnd\Shared\BuildRequestConfiguration.cs (5)
471ProjectLoadSettings projectLoadSettings = componentHost.BuildParameters.ProjectLoadSettings; 475projectLoadSettings |= ProjectLoadSettings.IgnoreMissingImports | ProjectLoadSettings.IgnoreInvalidImports | ProjectLoadSettings.IgnoreEmptyImports; 480projectLoadSettings |= ProjectLoadSettings.FailOnUnresolvedSdk;
Definition\Project.cs (37)
231: this(xml, globalProperties, toolsVersion, projectCollection, ProjectLoadSettings.Default) 246/// <param name="loadSettings">The <see cref="ProjectLoadSettings"/> to use for evaluation.</param> 247public Project(ProjectRootElement xml, IDictionary<string, string> globalProperties, string toolsVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings) 264/// <param name="loadSettings">The <see cref="ProjectLoadSettings"/> to use for evaluation.</param> 265public Project(ProjectRootElement xml, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings) 270private Project(ProjectRootElement xml, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings, 325: this(xmlReader, globalProperties, toolsVersion, projectCollection, ProjectLoadSettings.Default) 340/// <param name="loadSettings">The <see cref="ProjectLoadSettings"/> to use for evaluation.</param> 341public Project(XmlReader xmlReader, IDictionary<string, string> globalProperties, string toolsVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings) 359public Project(XmlReader xmlReader, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings) 364private Project(XmlReader xmlReader, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings, 419: this(projectFile, globalProperties, toolsVersion, projectCollection, ProjectLoadSettings.Default) 436public Project(string projectFile, IDictionary<string, string> globalProperties, string toolsVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings) 455public Project(string projectFile, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings) 460private Project(string projectFile, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings, 936/// To avoid reevaluation use <see cref="ProjectLoadSettings.RecordEvaluatedItemElements"/>. 958/// To avoid reevaluation use <see cref="ProjectLoadSettings.RecordEvaluatedItemElements"/>. 1020/// To avoid reevaluation use <see cref="ProjectLoadSettings.RecordEvaluatedItemElements"/>. 1044/// To avoid reevaluation use <see cref="ProjectLoadSettings.RecordEvaluatedItemElements"/>. 1074/// To avoid reevaluation use <see cref="ProjectLoadSettings.RecordEvaluatedItemElements"/>. 1863private ProjectLoadSettings _loadSettings; 1885/// <param name="loadSettings">The <see cref="ProjectLoadSettings"/> to use for evaluation.</param> 1886public ProjectImpl(Project owner, ProjectRootElement xml, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectLoadSettings loadSettings) 1910public ProjectImpl(Project owner, XmlReader xmlReader, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext) 1945public ProjectImpl(Project owner, string projectFile, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext) 2283ErrorUtilities.VerifyThrowInvalidOperation((_loadSettings & ProjectLoadSettings.RecordDuplicateButNotCircularImports) != 0, "OM_MustSetRecordDuplicateInputs"); 2512/// To avoid reevaluation use <see cref="ProjectLoadSettings.RecordEvaluatedItemElements"/>. 2525/// To avoid reevaluation use <see cref="ProjectLoadSettings.RecordEvaluatedItemElements"/>. 2692/// To avoid reevaluation use <see cref="ProjectLoadSettings.RecordEvaluatedItemElements"/>. 2706/// To avoid reevaluation use <see cref="ProjectLoadSettings.RecordEvaluatedItemElements"/>. 2723/// To avoid reevaluation use <see cref="ProjectLoadSettings.RecordEvaluatedItemElements"/>. 2747if (!_loadSettings.HasFlag(ProjectLoadSettings.RecordEvaluatedItemElements)) 2749_loadSettings |= ProjectLoadSettings.RecordEvaluatedItemElements; 3684ProjectLoadSettings loadSettings, 3718ProjectLoadSettings loadSettings, 3773internal void Initialize(IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext, bool interactive) 3803var canEvaluateElementsWithFalseConditions = Traits.Instance.EscapeHatches.EvaluateElementsWithFalseConditionInProjectEvaluation ?? !loadSettings.HasFlag(ProjectLoadSettings.DoNotEvaluateElementsWithFalseCondition);
Definition\ProjectOptions.cs (3)
39/// The <see cref="ProjectLoadSettings"/> to use for evaluation. 41public ProjectLoadSettings LoadSettings { get; set; } = ProjectLoadSettings.Default;
Evaluation\Evaluator.cs (19)
133private readonly ProjectLoadSettings _loadSettings; 205ProjectLoadSettings loadSettings, 307ProjectLoadSettings loadSettings, 323var profileEvaluation = (loadSettings & ProjectLoadSettings.ProfileEvaluation) != 0 || loggingService.IncludeEvaluationProfile; 1667(_loadSettings & ProjectLoadSettings.IgnoreMissingImports) == 0) 1806failOnUnresolvedSdk: !_loadSettings.HasFlag(ProjectLoadSettings.IgnoreMissingImports) || _loadSettings.HasFlag(ProjectLoadSettings.FailOnUnresolvedSdk)); 1817if (_loadSettings.HasFlag(ProjectLoadSettings.IgnoreMissingImports) && !_loadSettings.HasFlag(ProjectLoadSettings.FailOnUnresolvedSdk)) 1995if ((_loadSettings & ProjectLoadSettings.IgnoreInvalidImports) != 0) 2110if ((_loadSettings & ProjectLoadSettings.RejectCircularImports) != 0 || (_loadSettings & ProjectLoadSettings.RecordDuplicateButNotCircularImports) != 0) 2121if ((_loadSettings & ProjectLoadSettings.RejectCircularImports) != 0) 2172if ((_loadSettings & ProjectLoadSettings.RecordDuplicateButNotCircularImports) != 0) 2228if ((_loadSettings & ProjectLoadSettings.IgnoreMissingImports) != 0) 2266if (((_loadSettings & ProjectLoadSettings.IgnoreEmptyImports) != 0 || Traits.Instance.EscapeHatches.IgnoreEmptyImports) && ProjectRootElement.IsEmptyXmlFile(importFileUnescaped)) 2273else if ((_loadSettings & ProjectLoadSettings.IgnoreInvalidImports) != 0) 2479if ((_loadSettings & ProjectLoadSettings.RecordEvaluatedItemElements) == ProjectLoadSettings.RecordEvaluatedItemElements)
Instance\ProjectInstance.cs (4)
295ProjectLoadSettings? projectLoadSettings, EvaluationContext evaluationContext, IDirectoryCacheFactory directoryCacheFactory, bool interactive) 513ProjectLoadSettings? projectLoadSettings, EvaluationContext evaluationContext, IDirectoryCacheFactory directoryCacheFactory, bool interactive) 613internal ProjectInstance(string projectFile, IDictionary<string, string> globalProperties, string toolsVersion, BuildParameters buildParameters, ILoggingService loggingService, BuildEventContext buildEventContext, ISdkResolverService sdkResolverService, int submissionId, ProjectLoadSettings? projectLoadSettings) 3085ProjectLoadSettings? projectLoadSettings = null,
Microsoft.Build.Engine.OM.UnitTests (20)
Definition\Project_Tests.cs (7)
373Project project = new Project(xml, null, null, collection, ProjectLoadSettings.IgnoreMissingImports); 389Project project = new Project(xml, null, null, new ProjectCollection(), ProjectLoadSettings.IgnoreMissingImports); 1323Project p = new Project(GetSampleProjectRootElement(), globalProperties, ObjectModelHelpers.MSBuildDefaultToolsVersion, "ABCDEF", collection, ProjectLoadSettings.Default); 3992Project unused = new Project(pre, null, null, collection, ProjectLoadSettings.IgnoreEmptyImports); 4039Project unused = new Project(pre, null, null, collection, ProjectLoadSettings.IgnoreInvalidImports); 4079Project unused = new Project(pre, null, null, collection, ProjectLoadSettings.IgnoreInvalidImports); 4122Project unused = new Project(pre, null, null, collection, ProjectLoadSettings.IgnoreMissingImports);
Instance\ProjectInstance_Tests.cs (6)
462var loadSettings = ProjectLoadSettings.RecordDuplicateButNotCircularImports 463| ProjectLoadSettings.RejectCircularImports 464| ProjectLoadSettings.IgnoreEmptyImports 465| ProjectLoadSettings.IgnoreMissingImports 466| ProjectLoadSettings.IgnoreInvalidImports;
ObjectModelRemoting\LinkedEvaluationReadOnly_Tests.cs (2)
24var projReal = this.Remote[0].LoadProjectWithSettings(this.BigFile, ProjectLoadSettings.IgnoreMissingImports | ProjectLoadSettings.RecordDuplicateButNotCircularImports);
ObjectModelRemoting\LinkedSpecialCasesScenarios.cs (1)
80var newReal = this.StdGroup.Target.LoadInMemoryWithSettings(content, ProjectLoadSettings.IgnoreMissingImports);
ObjectModelRemoting\RemoteProjectsProviderMock\ExporterMock.cs (4)
163public Project LoadProjectIgnoreMissingImports(string path) => LoadProjectWithSettings(path, ProjectLoadSettings.IgnoreMissingImports); 165public Project LoadProjectWithSettings(string path, ProjectLoadSettings settings) => new Project(path, null, null, this.Collection, settings); 168public Project LoadInMemoryWithSettings(string content, ProjectLoadSettings settings = ProjectLoadSettings.Default)
Microsoft.Build.Engine.UnitTests (18)
Definition\Project_Internal_Tests.cs (1)
237using ProjectFromString projectFromString = new(projectContents, new Dictionary<string, string>(), MSBuildConstants.CurrentToolsVersion, projectCollection, ProjectLoadSettings.DoNotEvaluateElementsWithFalseCondition);
Definition\ProjectEvaluationContext_Tests.cs (3)
212LoadSettings = ProjectLoadSettings.IgnoreMissingImports 254LoadSettings = ProjectLoadSettings.IgnoreMissingImports 1001LoadSettings = ProjectLoadSettings.IgnoreMissingImports
Evaluation\Evaluator_Tests.cs (5)
956using ProjectFromString projectFromString = new(content, null, null, pc, ProjectLoadSettings.RecordDuplicateButNotCircularImports); 1041using ProjectFromString projectFromString = new(manifest, null, null, pc, ProjectLoadSettings.RecordDuplicateButNotCircularImports); 1106Project project = new Project(XmlReader.Create(new StringReader(manifest)), null, null, pc, ProjectLoadSettings.RejectCircularImports); 4290using ProjectFromString projectFromString = new(content, globalProperties, "Fake", "FakeSubToolset", fakeProjectCollection, ProjectLoadSettings.Default); 4334using ProjectFromString projectFromString = new(content, null, "Fake", "FakeSubToolset", fakeProjectCollection, ProjectLoadSettings.Default);
Evaluation\ProjectSdkImplicitImport_Tests.cs (2)
484loadSettings: ProjectLoadSettings.IgnoreMissingImports); 669projectOptions.LoadSettings |= ProjectLoadSettings.IgnoreMissingImports;
EvaluationProfiler_Tests.cs (1)
275ProjectLoadSettings = setProjectLoadSetting ? ProjectLoadSettings.ProfileEvaluation : 0
Instance\ProjectInstance_Internal_Tests.cs (6)
826[InlineData(false, ProjectLoadSettings.Default)] 827[InlineData(false, ProjectLoadSettings.RecordDuplicateButNotCircularImports)] 828[InlineData(true, ProjectLoadSettings.Default)] 829[InlineData(true, ProjectLoadSettings.RecordDuplicateButNotCircularImports)] 830public void GetImportPathsAndImportPathsIncludingDuplicates(bool useDirectConstruction, ProjectLoadSettings projectLoadSettings) 869string[] expectedImportPathsIncludingDuplicates = projectLoadSettings.HasFlag(ProjectLoadSettings.RecordDuplicateButNotCircularImports)
Microsoft.Build.UnitTests.Shared (3)
ProjectFromString.cs (3)
31public ProjectFromString(string s, IDictionary<string, string> globalProperties, string toolsVersion, ProjectCollection collection, ProjectLoadSettings loadSettings = ProjectLoadSettings.Default) 36public ProjectFromString(string s, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (7)
Build\ProjectBuildManager.cs (7)
106var projectLoadSettings = MSB.Evaluation.ProjectLoadSettings.RejectCircularImports 107| MSB.Evaluation.ProjectLoadSettings.IgnoreEmptyImports 108| MSB.Evaluation.ProjectLoadSettings.IgnoreMissingImports 109| MSB.Evaluation.ProjectLoadSettings.IgnoreInvalidImports 110| MSB.Evaluation.ProjectLoadSettings.DoNotEvaluateElementsWithFalseCondition 111| MSB.Evaluation.ProjectLoadSettings.FailOnUnresolvedSdk;
MSBuild (1)
XMake.cs (1)
1510parameters.ProjectLoadSettings |= ProjectLoadSettings.ProfileEvaluation;