2 implementations of File
Microsoft.Build (2)
ElementLocation\ElementLocation.cs (1)
37
public abstract string
File
ElementLocation\RegistryLocation.cs (1)
49
public string
File
51 references to File
Microsoft.Build (33)
BuildCheck\Checks\NoEnvironmentVariablePropertyCheck.cs (6)
64
else if (CheckScopeClassifier.IsActionInObservedScope(_scope, context.Data.EnvironmentVariableLocation.
File
, context.Data.ProjectFilePath))
86
if (!CheckScopeClassifier.IsActionInObservedScope(_scope, context.Data.EnvironmentVariableLocation.
File
, projectPath))
113
Location.
File
== other.Location.
File
&&
120
hashCode = hashCode * 31 + (Location.
File
!= null ? Location.
File
.GetHashCode() : 0);
BuildCheck\Infrastructure\CheckScopeClassifier.cs (1)
36
=> IsActionInObservedScope(scope, location?.
File
, projectFileFullPath);
BuildEventFileInfo.cs (1)
42
: this(location.
File
, location.Line, location.Column)
Definition\ProjectProperty.cs (2)
127
EnvironmentVariableReadEventArgs args = new(Name, EvaluatedValueEscapedInternal, location.
File
, location.Line, location.Column);
134
_location = (location.
File
, location.Line, location.Column);
ElementLocation\ElementLocation.cs (1)
120
if (!String.Equals(this.File, that.
File
, StringComparison.OrdinalIgnoreCase))
Evaluation\Expander.cs (14)
598
T itemToAdd = itemFactory.CreateItem(split, elementLocation.
File
);
1643
if (elementLocation.
File
.Length == 0)
1654
value = Path.GetFileName(elementLocation.
File
);
1658
value = Path.GetFileNameWithoutExtension(elementLocation.
File
);
1662
value = FileUtilities.NormalizePath(elementLocation.
File
);
1666
value = Path.GetExtension(elementLocation.
File
);
1670
value = FileUtilities.EnsureTrailingSlash(Path.GetDirectoryName(elementLocation.
File
));
1674
string directory = Path.GetDirectoryName(elementLocation.
File
);
2117
T newItem = itemFactory.CreateItem(expandedItemVector, elementLocation.
File
);
2148
result.Add(itemFactory.CreateItem(itemSpec, elementLocation.
File
));
2153
? itemFactory.CreateItem(originalItem, elementLocation.
File
) // itemspec came from direct item reference, no transforms
2154
: itemFactory.CreateItem(itemSpec, originalItem, elementLocation.
File
)); // itemspec came from a transform and is different from its original item
3992
string startingDirectory = String.IsNullOrWhiteSpace(elementLocation.
File
) ? String.Empty : Path.GetDirectoryName(elementLocation.
File
);
Evaluation\Profiler\EvaluationProfiler.cs (1)
79
return _shouldTrackElements ? new EvaluationFrame(this, CurrentLocation.WithFileLineAndCondition(location.
File
, location.Line, condition)) : null;
Evaluation\PropertyTrackingEvaluatorDataWrapper.cs (4)
299
location?.
File
,
337
location?.
File
,
459
location.
File
,
478
location.
File
,
Instance\ProjectPropertyInstance.cs (2)
118
EnvironmentVariableReadEventArgs args = new(Name, _escapedValue, location.
File
, location.Line, location.Column);
125
_location = (location.
File
, location.Line, location.Column);
ProjectErrorUtilities.cs (1)
268
throw new InvalidProjectFileException(elementLocation.
File
, elementLocation.Line, elementLocation.Column, 0 /* Unknown end line */, 0 /* Unknown end column */, message, errorSubCategory, errorCode, helpKeyword);
Microsoft.Build.Engine.UnitTests (15)
Construction\ElementLocation_Tests.cs (14)
42
Assert.Equal("file", location.
File
);
55
Assert.Equal("file", location.
File
);
68
Assert.Equal("file", location.
File
);
169
Assert.Equal(location.
File
, deserializedLocation.
File
);
187
Assert.Equal(location.
File
, deserializedLocation.
File
);
200
Assert.Equal("file", location.
File
);
235
Assert.Equal(location.
File
, String.Empty);
245
Assert.Equal("file", location.
File
);
258
Assert.Equal("file", location.
File
);
271
Assert.Equal("file", location.
File
);
289
Assert.Equal(location.
File
, deserializedLocation.
File
);
Evaluation\ItemSpec_Tests.cs (1)
85
return new ProjectInstanceItemSpec(itemSpec, expander, location, Path.GetDirectoryName(location.
File
));
Microsoft.Build.Framework (3)
BuildCheck\BuildCheckEventArgs.cs (3)
163
: base(code: result.Code, file: result.Location.
File
, lineNumber: result.Location.Line, columnNumber: result.Location.Column, message: result.FormatMessage()) =>
186
: base(code: result.Code, file: result.Location.
File
, lineNumber: result.Location.Line, columnNumber: result.Location.Column, message: result.FormatMessage())
209
: base(code: result.Code, file: result.Location.
File
, lineNumber: result.Location.Line, columnNumber: result.Location.Column, message: result.FormatMessage())