1 write to Data
Microsoft.Build (1)
BuildCheck\OM\BuildCheckDataContext.cs (1)
74
Data
= data;
51 references to Data
Microsoft.Build (51)
BuildCheck\Checks\CopyAlwaysCheck.cs (6)
48
if (_projectsSeen.Contains(context.
Data
.ProjectFilePath))
53
context.
Data
.EvaluatedProperties.TryGetValue("SkipUnchangedFilesOnCopyAlways", out string? skipUnchanged);
58
_projectsSeen.Add(context.
Data
.ProjectFilePath);
66
if (!_projectsSeen.Add(context.
Data
.ProjectFilePath))
71
foreach (ItemData itemData in context.
Data
.EnumerateItemsOfTypes([ItemNames.Content, ItemNames.Compile, ItemNames.None, ItemNames.EmbeddedResource]))
84
Path.GetFileName(context.
Data
.ProjectFilePath),
BuildCheck\Checks\DoubleWritesCheck.cs (9)
52
switch (context.
Data
.TaskName)
63
var taskParameters = context.
Data
.Parameters;
83
var taskParameters = context.
Data
.Parameters;
110
fileBeingWritten = Path.GetFullPath(fileBeingWritten, context.
Data
.ProjectFileDirectory);
116
context.
Data
.TaskInvocationLocation,
117
context.
Data
.TaskName,
119
Path.GetFileName(context.
Data
.ProjectFilePath),
125
_filesWritten.Add(fileBeingWritten, (context.
Data
.ProjectFilePath, context.
Data
.TaskName));
BuildCheck\Checks\EmbeddedResourceCheck.cs (3)
41
if (!_projects.Add(context.
Data
.ProjectFilePath))
46
foreach (ItemData itemData in context.
Data
.EnumerateItemsOfType(ItemNames.EmbeddedResource))
79
Path.GetFileName(context.
Data
.ProjectFilePath),
BuildCheck\Checks\NoEnvironmentVariablePropertyCheck.cs (12)
56
EnvironmentVariableIdentityKey identityKey = new(context.
Data
.EnvironmentVariableName, context.
Data
.EnvironmentVariableLocation);
62
_buildCheckResults.Enqueue((context.
Data
.ProjectFilePath, context));
64
else if (CheckScopeClassifier.IsActionInObservedScope(_scope, context.
Data
.EnvironmentVariableLocation.File, context.
Data
.ProjectFilePath))
68
context.
Data
.EnvironmentVariableLocation,
69
GetFormattedMessage(context.
Data
.EnvironmentVariableName, context.
Data
.EnvironmentVariableValue)));
86
if (!CheckScopeClassifier.IsActionInObservedScope(_scope, context.
Data
.EnvironmentVariableLocation.File, projectPath))
93
context.
Data
.EnvironmentVariableLocation,
94
GetFormattedMessage(context.
Data
.EnvironmentVariableName, context.
Data
.EnvironmentVariableValue)));
BuildCheck\Checks\PreferProjectReferenceCheck.cs (10)
50
if (_projectsSeen.Contains(context.
Data
.ProjectFilePath))
57
context.
Data
.EvaluatedProperties.TryGetValue(ItemMetadataNames.targetPath, out targetPath);
64
targetPath = BuildCheckUtilities.RootEvaluatedPath(targetPath, context.
Data
.ProjectFilePath);
66
_projectsPerOutputPath[targetPath] = context.
Data
.ProjectFilePath;
75
Path.GetFileName(context.
Data
.ProjectFilePath),
85
if (!_projectsSeen.Add(context.
Data
.ProjectFilePath))
90
foreach (ItemData itemData in context.
Data
.EnumerateItemsOfType(ItemNames.Reference))
93
string referenceFullPath = BuildCheckUtilities.RootEvaluatedPath(evaluatedReferencePath, context.
Data
.ProjectFilePath);
95
_projectsPerReferencePath[referenceFullPath] = (context.
Data
.ProjectFilePath, evaluatedReferencePath);
104
Path.GetFileName(context.
Data
.ProjectFilePath),
BuildCheck\Checks\PropertiesUsageCheck.cs (2)
131
PropertyWriteData writeData = context.
Data
;
171
PropertyReadData readData = context.
Data
;
BuildCheck\Checks\SharedOutputPathCheck.cs (4)
43
if (!_projectsSeen.Add(context.
Data
.ProjectFilePath))
50
context.
Data
.EvaluatedProperties.TryGetValue("OutputPath", out binPath);
51
context.
Data
.EvaluatedProperties.TryGetValue("IntermediateOutputPath", out objPath);
72
string projectPath = context.
Data
.ProjectFilePath;
BuildCheck\Checks\TargetFrameworkConfusionCheck.cs (5)
41
if (!_projectsSeen.Add(context.
Data
.ProjectFilePath))
48
if (context.
Data
.EvaluatedProperties.TryGetValue(PropertyNames.TargetFrameworks, out frameworks) &&
49
context.
Data
.EvaluatedProperties.TryGetValue(PropertyNames.TargetFramework, out framework) &&
50
!context.
Data
.GlobalProperties.ContainsKey(PropertyNames.TargetFramework))
57
Path.GetFileName(context.
Data
.ProjectFilePath),