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