127 references to ProjectLoadSettings
Microsoft.Build (78)
BackEnd\BuildManager\BuildManager.cs (5)
1897
ProjectLoadSettings
projectLoadSettings = _buildParameters!.ProjectLoadSettings;
1900
projectLoadSettings |=
ProjectLoadSettings
.IgnoreMissingImports |
ProjectLoadSettings
.IgnoreInvalidImports |
ProjectLoadSettings
.IgnoreEmptyImports;
1905
projectLoadSettings |=
ProjectLoadSettings
.FailOnUnresolvedSdk;
BackEnd\BuildManager\BuildParameters.cs (3)
217
private
ProjectLoadSettings
_projectLoadSettings =
ProjectLoadSettings
.Default;
758
public
ProjectLoadSettings
ProjectLoadSettings
BackEnd\Components\SdkResolution\MainNodeSdkResolverService.cs (2)
76
bool failOnUnresolvedSdk = !Host.BuildParameters.ProjectLoadSettings.HasFlag(
ProjectLoadSettings
.IgnoreMissingImports) || Host.BuildParameters.ProjectLoadSettings.HasFlag(
ProjectLoadSettings
.FailOnUnresolvedSdk);
BackEnd\Shared\BuildRequestConfiguration.cs (5)
467
ProjectLoadSettings
projectLoadSettings = componentHost.BuildParameters.ProjectLoadSettings;
471
projectLoadSettings |=
ProjectLoadSettings
.IgnoreMissingImports |
ProjectLoadSettings
.IgnoreInvalidImports |
ProjectLoadSettings
.IgnoreEmptyImports;
476
projectLoadSettings |=
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>
241
public 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>
259
public Project(ProjectRootElement xml, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectCollection projectCollection,
ProjectLoadSettings
loadSettings)
264
private 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>
335
public Project(XmlReader xmlReader, IDictionary<string, string> globalProperties, string toolsVersion, ProjectCollection projectCollection,
ProjectLoadSettings
loadSettings)
353
public Project(XmlReader xmlReader, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectCollection projectCollection,
ProjectLoadSettings
loadSettings)
358
private Project(XmlReader xmlReader, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectCollection projectCollection,
ProjectLoadSettings
loadSettings,
413
: this(projectFile, globalProperties, toolsVersion, projectCollection,
ProjectLoadSettings
.Default)
430
public Project(string projectFile, IDictionary<string, string> globalProperties, string toolsVersion, ProjectCollection projectCollection,
ProjectLoadSettings
loadSettings)
449
public Project(string projectFile, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion, ProjectCollection projectCollection,
ProjectLoadSettings
loadSettings)
454
private 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"/>.
1857
private
ProjectLoadSettings
_loadSettings;
1879
/// <param name="loadSettings">The <see cref="
ProjectLoadSettings
"/> to use for evaluation.</param>
1880
public ProjectImpl(Project owner, ProjectRootElement xml, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion,
ProjectLoadSettings
loadSettings)
1904
public ProjectImpl(Project owner, XmlReader xmlReader, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion,
ProjectLoadSettings
loadSettings, EvaluationContext evaluationContext)
1939
public ProjectImpl(Project owner, string projectFile, IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion,
ProjectLoadSettings
loadSettings, EvaluationContext evaluationContext)
2277
ErrorUtilities.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"/>.
2741
if (!_loadSettings.HasFlag(
ProjectLoadSettings
.RecordEvaluatedItemElements))
2743
_loadSettings |=
ProjectLoadSettings
.RecordEvaluatedItemElements;
3678
ProjectLoadSettings
loadSettings,
3712
ProjectLoadSettings
loadSettings,
3766
internal void Initialize(IDictionary<string, string> globalProperties, string toolsVersion, string subToolsetVersion,
ProjectLoadSettings
loadSettings, EvaluationContext evaluationContext, bool interactive)
3796
var canEvaluateElementsWithFalseConditions = Traits.Instance.EscapeHatches.EvaluateElementsWithFalseConditionInProjectEvaluation ?? !loadSettings.HasFlag(
ProjectLoadSettings
.DoNotEvaluateElementsWithFalseCondition);
Definition\ProjectOptions.cs (3)
39
/// The <see cref="
ProjectLoadSettings
"/> to use for evaluation.
41
public
ProjectLoadSettings
LoadSettings { get; set; } =
ProjectLoadSettings
.Default;
Evaluation\Evaluator.cs (19)
134
private readonly
ProjectLoadSettings
_loadSettings;
201
ProjectLoadSettings
loadSettings,
301
ProjectLoadSettings
loadSettings,
316
var profileEvaluation = (loadSettings &
ProjectLoadSettings
.ProfileEvaluation) != 0 || loggingService.IncludeEvaluationProfile;
1653
(_loadSettings &
ProjectLoadSettings
.IgnoreMissingImports) == 0)
1792
failOnUnresolvedSdk: !_loadSettings.HasFlag(
ProjectLoadSettings
.IgnoreMissingImports) || _loadSettings.HasFlag(
ProjectLoadSettings
.FailOnUnresolvedSdk));
1803
if (_loadSettings.HasFlag(
ProjectLoadSettings
.IgnoreMissingImports) && !_loadSettings.HasFlag(
ProjectLoadSettings
.FailOnUnresolvedSdk))
1978
if ((_loadSettings &
ProjectLoadSettings
.IgnoreInvalidImports) != 0)
2093
if ((_loadSettings &
ProjectLoadSettings
.RejectCircularImports) != 0 || (_loadSettings &
ProjectLoadSettings
.RecordDuplicateButNotCircularImports) != 0)
2104
if ((_loadSettings &
ProjectLoadSettings
.RejectCircularImports) != 0)
2155
if ((_loadSettings &
ProjectLoadSettings
.RecordDuplicateButNotCircularImports) != 0)
2211
if ((_loadSettings &
ProjectLoadSettings
.IgnoreMissingImports) != 0)
2249
if (((_loadSettings &
ProjectLoadSettings
.IgnoreEmptyImports) != 0 || Traits.Instance.EscapeHatches.IgnoreEmptyImports) && ProjectRootElement.IsEmptyXmlFile(importFileUnescaped))
2256
else if ((_loadSettings &
ProjectLoadSettings
.IgnoreInvalidImports) != 0)
2462
if ((_loadSettings &
ProjectLoadSettings
.RecordEvaluatedItemElements) ==
ProjectLoadSettings
.RecordEvaluatedItemElements)
Instance\ProjectInstance.cs (4)
295
ProjectLoadSettings
? projectLoadSettings, EvaluationContext evaluationContext, IDirectoryCacheFactory directoryCacheFactory, bool interactive)
513
ProjectLoadSettings
? projectLoadSettings, EvaluationContext evaluationContext, IDirectoryCacheFactory directoryCacheFactory, bool interactive)
613
internal ProjectInstance(string projectFile, IDictionary<string, string> globalProperties, string toolsVersion, BuildParameters buildParameters, ILoggingService loggingService, BuildEventContext buildEventContext, ISdkResolverService sdkResolverService, int submissionId,
ProjectLoadSettings
? projectLoadSettings)
3080
ProjectLoadSettings
? projectLoadSettings = null,
Microsoft.Build.Engine.OM.UnitTests (20)
Definition\Project_Tests.cs (7)
373
Project project = new Project(xml, null, null, collection,
ProjectLoadSettings
.IgnoreMissingImports);
389
Project project = new Project(xml, null, null, new ProjectCollection(),
ProjectLoadSettings
.IgnoreMissingImports);
1323
Project p = new Project(GetSampleProjectRootElement(), globalProperties, ObjectModelHelpers.MSBuildDefaultToolsVersion, "ABCDEF", collection,
ProjectLoadSettings
.Default);
3992
Project unused = new Project(pre, null, null, collection,
ProjectLoadSettings
.IgnoreEmptyImports);
4039
Project unused = new Project(pre, null, null, collection,
ProjectLoadSettings
.IgnoreInvalidImports);
4079
Project unused = new Project(pre, null, null, collection,
ProjectLoadSettings
.IgnoreInvalidImports);
4122
Project unused = new Project(pre, null, null, collection,
ProjectLoadSettings
.IgnoreMissingImports);
Instance\ProjectInstance_Tests.cs (6)
463
var
loadSettings =
ProjectLoadSettings
.RecordDuplicateButNotCircularImports
464
|
ProjectLoadSettings
.RejectCircularImports
465
|
ProjectLoadSettings
.IgnoreEmptyImports
466
|
ProjectLoadSettings
.IgnoreMissingImports
467
|
ProjectLoadSettings
.IgnoreInvalidImports;
ObjectModelRemoting\LinkedEvaluationReadOnly_Tests.cs (2)
24
var projReal = this.Remote[0].LoadProjectWithSettings(this.BigFile,
ProjectLoadSettings
.IgnoreMissingImports |
ProjectLoadSettings
.RecordDuplicateButNotCircularImports);
ObjectModelRemoting\LinkedSpecialCasesScenarios.cs (1)
80
var newReal = this.StdGroup.Target.LoadInMemoryWithSettings(content,
ProjectLoadSettings
.IgnoreMissingImports);
ObjectModelRemoting\RemoteProjectsProviderMock\ExporterMock.cs (4)
165
public Project LoadProjectIgnoreMissingImports(string path) => LoadProjectWithSettings(path,
ProjectLoadSettings
.IgnoreMissingImports);
167
public Project LoadProjectWithSettings(string path,
ProjectLoadSettings
settings) => new Project(path, null, null, this.Collection, settings);
170
public Project LoadInMemoryWithSettings(string content,
ProjectLoadSettings
settings =
ProjectLoadSettings
.Default)
Microsoft.Build.Engine.UnitTests (18)
Definition\Project_Internal_Tests.cs (1)
238
using ProjectFromString projectFromString = new(projectContents, new Dictionary<string, string>(), MSBuildConstants.CurrentToolsVersion, projectCollection,
ProjectLoadSettings
.DoNotEvaluateElementsWithFalseCondition);
Definition\ProjectEvaluationContext_Tests.cs (3)
212
LoadSettings =
ProjectLoadSettings
.IgnoreMissingImports
254
LoadSettings =
ProjectLoadSettings
.IgnoreMissingImports
1001
LoadSettings =
ProjectLoadSettings
.IgnoreMissingImports
Evaluation\Evaluator_Tests.cs (5)
921
using ProjectFromString projectFromString = new(content, null, null, pc,
ProjectLoadSettings
.RecordDuplicateButNotCircularImports);
1006
using ProjectFromString projectFromString = new(manifest, null, null, pc,
ProjectLoadSettings
.RecordDuplicateButNotCircularImports);
1071
Project project = new Project(XmlReader.Create(new StringReader(manifest)), null, null, pc,
ProjectLoadSettings
.RejectCircularImports);
4255
using ProjectFromString projectFromString = new(content, globalProperties, "Fake", "FakeSubToolset", fakeProjectCollection,
ProjectLoadSettings
.Default);
4299
using ProjectFromString projectFromString = new(content, null, "Fake", "FakeSubToolset", fakeProjectCollection,
ProjectLoadSettings
.Default);
Evaluation\ProjectSdkImplicitImport_Tests.cs (2)
484
loadSettings:
ProjectLoadSettings
.IgnoreMissingImports);
669
projectOptions.LoadSettings |=
ProjectLoadSettings
.IgnoreMissingImports;
EvaluationProfiler_Tests.cs (1)
276
ProjectLoadSettings = 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)]
831
public void GetImportPathsAndImportPathsIncludingDuplicates(bool useDirectConstruction,
ProjectLoadSettings
projectLoadSettings)
870
string[] expectedImportPathsIncludingDuplicates = projectLoadSettings.HasFlag(
ProjectLoadSettings
.RecordDuplicateButNotCircularImports)
Microsoft.Build.UnitTests.Shared (3)
ProjectFromString.cs (3)
31
public ProjectFromString(string s, IDictionary<string, string> globalProperties, string toolsVersion, ProjectCollection collection,
ProjectLoadSettings
loadSettings =
ProjectLoadSettings
.Default)
36
public 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)
106
var
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)
1501
parameters.ProjectLoadSettings |=
ProjectLoadSettings
.ProfileEvaluation;