@@ -264,11 +264,11 @@ private Evaluator(
264
264
_sdkResolverService = sdkResolverService ;
265
265
_submissionId = submissionId ;
266
266
_evaluationProfiler = new EvaluationProfiler ( profileEvaluation ) ;
267
- _isRunningInVisualStudio = String . Equals ( "true" , _data . GlobalPropertiesDictionary . GetProperty ( "BuildingInsideVisualStudio" ) ? . EvaluatedValue , StringComparison . OrdinalIgnoreCase ) ;
267
+ _isRunningInVisualStudio = string . Equals ( "true" , _data . GlobalPropertiesDictionary . GetProperty ( "BuildingInsideVisualStudio" ) ? . EvaluatedValue , StringComparison . OrdinalIgnoreCase ) ;
268
268
269
269
// In 15.9 we added support for the global property "NuGetInteractive" to allow SDK resolvers to be interactive.
270
270
// In 16.0 we added the /interactive command-line argument so the line below keeps back-compat
271
- _interactive = interactive || String . Equals ( "true" , _data . GlobalPropertiesDictionary . GetProperty ( "NuGetInteractive" ) ? . EvaluatedValue , StringComparison . OrdinalIgnoreCase ) ;
271
+ _interactive = interactive || string . Equals ( "true" , _data . GlobalPropertiesDictionary . GetProperty ( "NuGetInteractive" ) ? . EvaluatedValue , StringComparison . OrdinalIgnoreCase ) ;
272
272
273
273
// The last modified project is the project itself unless its an in-memory project
274
274
if ( projectRootElement . FullPath != null )
@@ -626,7 +626,7 @@ private static ProjectTargetInstance ReadNewTargetElement(ProjectTargetElement t
626
626
/// </summary>
627
627
private void Evaluate ( )
628
628
{
629
- string projectFile = String . IsNullOrEmpty ( _projectRootElement . ProjectFileLocation . File ) ? "(null)" : _projectRootElement . ProjectFileLocation . File ;
629
+ string projectFile = string . IsNullOrEmpty ( _projectRootElement . ProjectFileLocation . File ) ? "(null)" : _projectRootElement . ProjectFileLocation . File ;
630
630
using ( _evaluationProfiler . TrackPass ( EvaluationPass . TotalEvaluation ) )
631
631
{
632
632
ErrorUtilities . VerifyThrow ( _data . EvaluationId == BuildEventContext . InvalidEvaluationId , "There is no prior evaluation ID. The evaluator data needs to be reset at this point" ) ;
@@ -812,15 +812,15 @@ private void Evaluate()
812
812
813
813
foreach ( var entry in _data . GlobalPropertiesDictionary )
814
814
{
815
- if ( ! String . Equals ( entry . Name , "currentsolutionconfigurationcontents" , StringComparison . OrdinalIgnoreCase ) )
815
+ if ( ! string . Equals ( entry . Name , "currentsolutionconfigurationcontents" , StringComparison . OrdinalIgnoreCase ) )
816
816
{
817
817
propertyDump += $ "{ entry . Name } ={ entry . EvaluatedValue } \n ";
818
818
}
819
819
}
820
820
821
821
string line = new string ( '#' , 100 ) + "\n " ;
822
822
823
- string output = String . Format ( CultureInfo . CurrentUICulture , "###: MSBUILD: Evaluating or reevaluating project {0} with {1} global properties and {2} tools version, child count {3}, CurrentSolutionConfigurationContents hash {4} other properties:\n {5}" , _projectRootElement . FullPath , globalPropertiesCount , _data . Toolset . ToolsVersion , _projectRootElement . Count , hash , propertyDump ) ;
823
+ string output = string . Format ( CultureInfo . CurrentUICulture , "###: MSBUILD: Evaluating or reevaluating project {0} with {1} global properties and {2} tools version, child count {3}, CurrentSolutionConfigurationContents hash {4} other properties:\n {5}" , _projectRootElement . FullPath , globalPropertiesCount , _data . Toolset . ToolsVersion , _projectRootElement . Count , hash , propertyDump ) ;
824
824
825
825
Trace . WriteLine ( line + output + line ) ;
826
826
}
@@ -1123,10 +1123,10 @@ private void ValidateChangeWaveState()
1123
1123
switch ( ChangeWaves . ConversionState )
1124
1124
{
1125
1125
case ChangeWaveConversionState . InvalidFormat :
1126
- _evaluationLoggingContext . LogWarning ( "" , new BuildEventFileInfo ( "" ) , "ChangeWave_InvalidFormat" , Traits . Instance . MSBuildDisableFeaturesFromVersion , $ "[{ String . Join ( ", " , ChangeWaves . AllWaves . Select ( x => x . ToString ( ) ) ) } ]") ;
1126
+ _evaluationLoggingContext . LogWarning ( "" , new BuildEventFileInfo ( "" ) , "ChangeWave_InvalidFormat" , Traits . Instance . MSBuildDisableFeaturesFromVersion , $ "[{ string . Join ( ", " , ChangeWaves . AllWaves . Select ( x => x . ToString ( ) ) ) } ]") ;
1127
1127
break ;
1128
1128
case ChangeWaveConversionState . OutOfRotation :
1129
- _evaluationLoggingContext . LogWarning ( "" , new BuildEventFileInfo ( "" ) , "ChangeWave_OutOfRotation" , ChangeWaves . DisabledWave , Traits . Instance . MSBuildDisableFeaturesFromVersion , $ "[{ String . Join ( ", " , ChangeWaves . AllWaves . Select ( x => x . ToString ( ) ) ) } ]") ;
1129
+ _evaluationLoggingContext . LogWarning ( "" , new BuildEventFileInfo ( "" ) , "ChangeWave_OutOfRotation" , ChangeWaves . DisabledWave , Traits . Instance . MSBuildDisableFeaturesFromVersion , $ "[{ string . Join ( ", " , ChangeWaves . AllWaves . Select ( x => x . ToString ( ) ) ) } ]") ;
1130
1130
break ;
1131
1131
}
1132
1132
}
@@ -1169,9 +1169,9 @@ private void AddBuiltInProperties()
1169
1169
SetBuiltInProperty ( ReservedPropertyNames . msbuildRuntimeType , "Full" ) ;
1170
1170
#endif
1171
1171
1172
- if ( String . IsNullOrEmpty ( _projectRootElement . FullPath ) )
1172
+ if ( string . IsNullOrEmpty ( _projectRootElement . FullPath ) )
1173
1173
{
1174
- SetBuiltInProperty ( ReservedPropertyNames . projectDirectory , String . IsNullOrEmpty ( _projectRootElement . DirectoryPath ) ?
1174
+ SetBuiltInProperty ( ReservedPropertyNames . projectDirectory , string . IsNullOrEmpty ( _projectRootElement . DirectoryPath ) ?
1175
1175
// If this is an un-saved project, this is as far as we can go
1176
1176
startupDirectory :
1177
1177
// Solution files based on the old OM end up here. But they do have a location, which is where the solution was loaded from.
@@ -1579,7 +1579,7 @@ private List<ProjectRootElement> ExpandAndLoadImports(string directoryOfImportin
1579
1579
1580
1580
_evaluationLoggingContext . LogComment ( MessageImportance . Low , "SearchPathsForMSBuildExtensionsPath" ,
1581
1581
extensionPropertyRefAsString ,
1582
- String . Join ( ";" , pathsToSearch ) ) ;
1582
+ string . Join ( ";" , pathsToSearch ) ) ;
1583
1583
1584
1584
bool atleastOneExactFilePathWasLookedAtAndNotFound = false ;
1585
1585
@@ -1995,7 +1995,7 @@ private LoadImportsResult ExpandAndLoadImportsFromUnescapedImportExpression(stri
1995
1995
string importExpressionEscaped = _expander . ExpandIntoStringLeaveEscaped ( unescapedExpression , ExpanderOptions . ExpandProperties , importElement . ProjectLocation ) ;
1996
1996
ElementLocation importLocationInProject = importElement . Location ;
1997
1997
1998
- if ( String . IsNullOrWhiteSpace ( importExpressionEscaped ) )
1998
+ if ( string . IsNullOrWhiteSpace ( importExpressionEscaped ) )
1999
1999
{
2000
2000
if ( ( _loadSettings & ProjectLoadSettings . IgnoreInvalidImports ) != 0 )
2001
2001
{
@@ -2021,7 +2021,7 @@ private LoadImportsResult ExpandAndLoadImportsFromUnescapedImportExpression(stri
2021
2021
return LoadImportsResult . ImportExpressionResolvedToNothing ;
2022
2022
}
2023
2023
2024
- ProjectErrorUtilities . ThrowInvalidProject ( importLocationInProject , "InvalidAttributeValue" , String . Empty , XMakeAttributes . project , XMakeElements . import ) ;
2024
+ ProjectErrorUtilities . ThrowInvalidProject ( importLocationInProject , "InvalidAttributeValue" , string . Empty , XMakeAttributes . project , XMakeElements . import ) ;
2025
2025
}
2026
2026
2027
2027
bool atleastOneImportIgnored = false ;
@@ -2101,7 +2101,7 @@ private LoadImportsResult ExpandAndLoadImportsFromUnescapedImportExpression(stri
2101
2101
2102
2102
// If a file is included twice, or there is a cycle of imports, we ignore all but the first import
2103
2103
// and issue a warning to that effect.
2104
- if ( String . Equals ( _projectRootElement . FullPath , importFileUnescaped , StringComparison . OrdinalIgnoreCase ) /* We are trying to import ourselves */ )
2104
+ if ( string . Equals ( _projectRootElement . FullPath , importFileUnescaped , StringComparison . OrdinalIgnoreCase ) /* We are trying to import ourselves */ )
2105
2105
{
2106
2106
_evaluationLoggingContext . LogWarning ( null , new BuildEventFileInfo ( importLocationInProject ) , "SelfImport" , importFileUnescaped ) ;
2107
2107
atleastOneImportIgnored = true ;
@@ -2118,7 +2118,7 @@ private LoadImportsResult ExpandAndLoadImportsFromUnescapedImportExpression(stri
2118
2118
if ( IntroducesCircularity ( importFileUnescaped , importElement ) )
2119
2119
{
2120
2120
// Get the full path of the MSBuild file that has this import.
2121
- string importedBy = importElement . ContainingProject . FullPath ?? String . Empty ;
2121
+ string importedBy = importElement . ContainingProject . FullPath ?? string . Empty ;
2122
2122
2123
2123
_evaluationLoggingContext . LogWarning ( null , new BuildEventFileInfo ( importLocationInProject ) , "ImportIntroducesCircularity" , importFileUnescaped , importedBy ) ;
2124
2124
@@ -2139,7 +2139,7 @@ private LoadImportsResult ExpandAndLoadImportsFromUnescapedImportExpression(stri
2139
2139
2140
2140
if ( _importsSeen . TryGetValue ( importFileUnescaped , out previouslyImportedAt ) )
2141
2141
{
2142
- string parenthesizedProjectLocation = String . Empty ;
2142
+ string parenthesizedProjectLocation = string . Empty ;
2143
2143
2144
2144
// If neither file involved is the project itself, append its path in square brackets
2145
2145
if ( previouslyImportedAt . ContainingProject != _projectRootElement && importElement . ContainingProject != _projectRootElement )
@@ -2371,14 +2371,14 @@ private bool IntroducesCircularity(string importFileUnescaped, ProjectImportElem
2371
2371
// Get the full path of the MSBuild file that imports this file.
2372
2372
string importedBy = importElement . ContainingProject . FullPath ;
2373
2373
2374
- if ( String . Equals ( importFileUnescaped , importedBy , StringComparison . OrdinalIgnoreCase ) )
2374
+ if ( string . Equals ( importFileUnescaped , importedBy , StringComparison . OrdinalIgnoreCase ) )
2375
2375
{
2376
2376
// Circular dependency found!
2377
2377
foundMatchingAncestor = true ;
2378
2378
break ;
2379
2379
}
2380
2380
2381
- if ( ! String . IsNullOrEmpty ( importedBy ) ) // The full path of a project loaded from memory can be null.
2381
+ if ( ! string . IsNullOrEmpty ( importedBy ) ) // The full path of a project loaded from memory can be null.
2382
2382
{
2383
2383
// Set the "counter" to the importing project.
2384
2384
_importsSeen . TryGetValue ( importedBy , out importElement ) ;
0 commit comments