127 references to ProjectLoadSettings
Microsoft.Build (78)
BackEnd\BuildManager\BuildManager.cs (5)
1897ProjectLoadSettings projectLoadSettings = _buildParameters!.ProjectLoadSettings; 1900projectLoadSettings |= ProjectLoadSettings.IgnoreMissingImports | ProjectLoadSettings.IgnoreInvalidImports | ProjectLoadSettings.IgnoreEmptyImports; 1905projectLoadSettings |= ProjectLoadSettings.FailOnUnresolvedSdk;
BackEnd\BuildManager\BuildParameters.cs (3)
217private ProjectLoadSettings _projectLoadSettings = ProjectLoadSettings.Default; 758public 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)
467ProjectLoadSettings projectLoadSettings = componentHost.BuildParameters.ProjectLoadSettings; 471projectLoadSettings |= ProjectLoadSettings.IgnoreMissingImports | ProjectLoadSettings.IgnoreInvalidImports | ProjectLoadSettings.IgnoreEmptyImports; 476projectLoadSettings |= ProjectLoadSettings.FailOnUnresolvedSdk;
Definition\Project.cs (37)
225: this(xml, globalProperties, toolsVersion, projectCollection, ProjectLoadSettings.Default) 240/// <param name="loadSettings">The <see cref="ProjectLoadSettings"/> to use for evaluation.</param> 241public Project(ProjectRootElement xml, IDictionary<string, string> globalProperties, string toolsVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings) 258/// <param name="loadSettings">The <see cref="ProjectLoadSettings"/> to use for evaluation.</param> 259public Project(ProjectRootElement xml, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings) 264private Project(ProjectRootElement xml, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings, 319: this(xmlReader, globalProperties, toolsVersion, projectCollection, ProjectLoadSettings.Default) 334/// <param name="loadSettings">The <see cref="ProjectLoadSettings"/> to use for evaluation.</param> 335public Project(XmlReader xmlReader, IDictionary<string, string> globalProperties, string toolsVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings) 353public Project(XmlReader xmlReader, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings) 358private Project(XmlReader xmlReader, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings, 413: this(projectFile, globalProperties, toolsVersion, projectCollection, ProjectLoadSettings.Default) 430public Project(string projectFile, IDictionary<string, string> globalProperties, string toolsVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings) 449public Project(string projectFile, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings) 454private Project(string projectFile, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectCollection projectCollection, ProjectLoadSettings loadSettings, 930/// To avoid reevaluation use <see cref="ProjectLoadSettings.RecordEvaluatedItemElements"/>. 952/// To avoid reevaluation use <see cref="ProjectLoadSettings.RecordEvaluatedItemElements"/>. 1014/// To avoid reevaluation use <see cref="ProjectLoadSettings.RecordEvaluatedItemElements"/>. 1038/// To avoid reevaluation use <see cref="ProjectLoadSettings.RecordEvaluatedItemElements"/>. 1068/// To avoid reevaluation use <see cref="ProjectLoadSettings.RecordEvaluatedItemElements"/>. 1857private ProjectLoadSettings _loadSettings; 1879/// <param name="loadSettings">The <see cref="ProjectLoadSettings"/> to use for evaluation.</param> 1880public ProjectImpl(Project owner, ProjectRootElement xml, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectLoadSettings loadSettings) 1904public ProjectImpl(Project owner, XmlReader xmlReader, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext) 1939public ProjectImpl(Project owner, string projectFile, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext) 2277ErrorUtilities.VerifyThrowInvalidOperation((_loadSettings & ProjectLoadSettings.RecordDuplicateButNotCircularImports) != 0, "OM_MustSetRecordDuplicateInputs"); 2506/// To avoid reevaluation use <see cref="ProjectLoadSettings.RecordEvaluatedItemElements"/>. 2519/// To avoid reevaluation use <see cref="ProjectLoadSettings.RecordEvaluatedItemElements"/>. 2686/// To avoid reevaluation use <see cref="ProjectLoadSettings.RecordEvaluatedItemElements"/>. 2700/// To avoid reevaluation use <see cref="ProjectLoadSettings.RecordEvaluatedItemElements"/>. 2717/// To avoid reevaluation use <see cref="ProjectLoadSettings.RecordEvaluatedItemElements"/>. 2741if (!_loadSettings.HasFlag(ProjectLoadSettings.RecordEvaluatedItemElements)) 2743_loadSettings |= ProjectLoadSettings.RecordEvaluatedItemElements; 3678ProjectLoadSettings loadSettings, 3712ProjectLoadSettings loadSettings, 3766internal void Initialize(IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectLoadSettings loadSettings, EvaluationContext evaluationContext, bool interactive) 3796var 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)
134private readonly ProjectLoadSettings _loadSettings; 201ProjectLoadSettings loadSettings, 301ProjectLoadSettings loadSettings, 316var profileEvaluation = (loadSettings & ProjectLoadSettings.ProfileEvaluation) != 0 || loggingService.IncludeEvaluationProfile; 1653(_loadSettings & ProjectLoadSettings.IgnoreMissingImports) == 0) 1792failOnUnresolvedSdk: !_loadSettings.HasFlag(ProjectLoadSettings.IgnoreMissingImports) || _loadSettings.HasFlag(ProjectLoadSettings.FailOnUnresolvedSdk)); 1803if (_loadSettings.HasFlag(ProjectLoadSettings.IgnoreMissingImports) && !_loadSettings.HasFlag(ProjectLoadSettings.FailOnUnresolvedSdk)) 1978if ((_loadSettings & ProjectLoadSettings.IgnoreInvalidImports) != 0) 2093if ((_loadSettings & ProjectLoadSettings.RejectCircularImports) != 0 || (_loadSettings & ProjectLoadSettings.RecordDuplicateButNotCircularImports) != 0) 2104if ((_loadSettings & ProjectLoadSettings.RejectCircularImports) != 0) 2155if ((_loadSettings & ProjectLoadSettings.RecordDuplicateButNotCircularImports) != 0) 2211if ((_loadSettings & ProjectLoadSettings.IgnoreMissingImports) != 0) 2249if (((_loadSettings & ProjectLoadSettings.IgnoreEmptyImports) != 0 || Traits.Instance.EscapeHatches.IgnoreEmptyImports) && ProjectRootElement.IsEmptyXmlFile(importFileUnescaped)) 2256else if ((_loadSettings & ProjectLoadSettings.IgnoreInvalidImports) != 0) 2462if ((_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) 3080ProjectLoadSettings? 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)
463var loadSettings = ProjectLoadSettings.RecordDuplicateButNotCircularImports 464| ProjectLoadSettings.RejectCircularImports 465| ProjectLoadSettings.IgnoreEmptyImports 466| ProjectLoadSettings.IgnoreMissingImports 467| 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)
165public Project LoadProjectIgnoreMissingImports(string path) => LoadProjectWithSettings(path, ProjectLoadSettings.IgnoreMissingImports); 167public Project LoadProjectWithSettings(string path, ProjectLoadSettings settings) => new Project(path, null, null, this.Collection, settings); 170public Project LoadInMemoryWithSettings(string content, ProjectLoadSettings settings = ProjectLoadSettings.Default)
Microsoft.Build.Engine.UnitTests (18)
Definition\Project_Internal_Tests.cs (1)
238using 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)
921using ProjectFromString projectFromString = new(content, null, null, pc, ProjectLoadSettings.RecordDuplicateButNotCircularImports); 1006using ProjectFromString projectFromString = new(manifest, null, null, pc, ProjectLoadSettings.RecordDuplicateButNotCircularImports); 1071Project project = new Project(XmlReader.Create(new StringReader(manifest)), null, null, pc, ProjectLoadSettings.RejectCircularImports); 4255using ProjectFromString projectFromString = new(content, globalProperties, "Fake", "FakeSubToolset", fakeProjectCollection, ProjectLoadSettings.Default); 4299using 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)
276ProjectLoadSettings = setProjectLoadSetting ? ProjectLoadSettings.ProfileEvaluation : 0
Instance\ProjectInstance_Internal_Tests.cs (6)
827[InlineData(false, ProjectLoadSettings.Default)] 828[InlineData(false, ProjectLoadSettings.RecordDuplicateButNotCircularImports)] 829[InlineData(true, ProjectLoadSettings.Default)] 830[InlineData(true, ProjectLoadSettings.RecordDuplicateButNotCircularImports)] 831public void GetImportPathsAndImportPathsIncludingDuplicates(bool useDirectConstruction, ProjectLoadSettings projectLoadSettings) 870string[] 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)
1501parameters.ProjectLoadSettings |= ProjectLoadSettings.ProfileEvaluation;