115 references to Instance
Microsoft.Build (67)
BackEnd\BuildManager\BuildManager.cs (3)
491if (Traits.Instance.DebugEngine) 663Traits.Instance.DebugEngine is false) 1973if (Traits.Instance.DebugEngine is false)
BackEnd\Components\BuildRequestEngine\BuildRequestEngine.cs (1)
123_debugDumpState = Traits.Instance.DebugScheduler;
BackEnd\Components\Communications\NodeLauncher.cs (3)
68if (Traits.Instance.EscapeHatches.EnsureStdOutForChildNodesIsPrimaryStdout) 75if (!Traits.Instance.EscapeHatches.EnsureStdOutForChildNodesIsPrimaryStdout) 106if (!Traits.Instance.EscapeHatches.EnsureStdOutForChildNodesIsPrimaryStdout)
BackEnd\Components\Communications\NodeProviderOutOfProcBase.cs (2)
116Traits.Instance.EscapeHatches.EnsureStdOutForChildNodesIsPrimaryStdout; 356if (Traits.Instance.DebugNodeCommunication)
BackEnd\Components\Logging\LoggingService.cs (2)
569bool? escapeHatch = Traits.Instance.EscapeHatches.LogPropertiesAndItemsAfterEvaluation; 987&& Traits.Instance.EscapeHatches.EnableWarningOnCustomBuildEvent)
BackEnd\Components\RequestBuilder\AssemblyLoadsTracker.cs (1)
110!Traits.Instance.LogAllAssemblyLoads &&
BackEnd\Components\RequestBuilder\IntrinsicTasks\ItemGroupLoggingHelper.cs (1)
124bool truncateTaskInputs = Traits.Instance.EscapeHatches.TruncateTaskInputs;
BackEnd\Components\RequestBuilder\TaskHost.cs (1)
128_disableInprocNode = Traits.Instance.InProcNodeDisabled || host.BuildParameters.DisableInProcNode;
BackEnd\Components\Scheduler\Scheduler.cs (2)
147=> Traits.Instance.InProcNodeDisabled || _componentHost.BuildParameters.DisableInProcNode; 183_debugDumpState = Traits.Instance.DebugScheduler;
BackEnd\Components\Scheduler\SchedulingPlan.cs (1)
220if (Traits.Instance.DebugScheduler)
BackEnd\Components\SdkResolution\CachingSdkResolverService.cs (1)
46if (Traits.Instance.EscapeHatches.DisableSdkResolutionCache)
BackEnd\Node\OutOfProcNode.cs (1)
589&& Traits.Instance.EscapeHatches.EnableWarningOnCustomBuildEvent)
BackEnd\Shared\BuildResult.cs (1)
86private int _version = Traits.Instance.EscapeHatches.DoNotVersionBuildResult ? 0 : 1;
BackEnd\TaskExecutionHost\TaskExecutionHost.cs (1)
173LogTaskInputs = Traits.Instance.EscapeHatches.LogTaskInputs;
BuildCheck\Infrastructure\CheckWrapper.cs (1)
38private readonly bool _limitReportsNumber = !Traits.Instance.EscapeHatches.DoNotLimitBuildCheckResultsNumber;
CommunicationsUtilities.cs (1)
213private static bool s_trace = Traits.Instance.DebugNodeCommunication;
Construction\Solution\SolutionProjectGenerator.cs (2)
188_batchProjectTargets = Traits.Instance.SolutionBatchTargets; 1030if (Traits.Instance.EmitSolutionMetaproj)
CoreCLRAssemblyLoader.cs (1)
58if (Traits.Instance.EscapeHatches.UseSingleLoadContext)
DebugUtils.cs (1)
35if (Traits.Instance.DebugEngine)
Definition\Project.cs (1)
3796var canEvaluateElementsWithFalseConditions = Traits.Instance.EscapeHatches.EvaluateElementsWithFalseConditionInProjectEvaluation ?? !loadSettings.HasFlag(ProjectLoadSettings.DoNotEvaluateElementsWithFalseCondition);
Definition\ProjectCollection.cs (1)
309if (Traits.Instance.UseSimpleProjectRootElementCacheConcurrency)
Definition\Toolset.cs (1)
913Traits.Instance.ForceEvaluateAsFullFramework ? "Full" : "Core",
Evaluation\Evaluator.cs (9)
228data = new PropertyTrackingEvaluatorDataWrapper<P, I, M, D>(data, _evaluationLoggingContext, Traits.Instance.LogPropertyTracking); 627_logProjectImportedEvents = Traits.Instance.EscapeHatches.LogProjectImports; 790if (Traits.Instance.EscapeHatches.DebugEvaluation) 868if (!Traits.Instance.EscapeHatches.IgnoreTreatAsLocalProperty) 1113_evaluationLoggingContext.LogWarning("", new BuildEventFileInfo(""), "ChangeWave_InvalidFormat", Traits.Instance.MSBuildDisableFeaturesFromVersion, $"[{String.Join(", ", ChangeWaves.AllWaves.Select(x => x.ToString()))}]"); 1116_evaluationLoggingContext.LogWarning("", new BuildEventFileInfo(""), "ChangeWave_OutOfRotation", ChangeWaves.DisabledWave, Traits.Instance.MSBuildDisableFeaturesFromVersion, $"[{String.Join(", ", ChangeWaves.AllWaves.Select(x => x.ToString()))}]"); 1154Traits.Instance.ForceEvaluateAsFullFramework ? "Full" : "Core"); 1743Traits.Instance.EscapeHatches.SdkReferencePropertyExpansion ?? 2249if (((_loadSettings & ProjectLoadSettings.IgnoreEmptyImports) != 0 || Traits.Instance.EscapeHatches.IgnoreEmptyImports) && ProjectRootElement.IsEmptyXmlFile(importFileUnescaped))
Evaluation\Expander.cs (5)
697return (options & ExpanderOptions.Truncate) != 0 && !Traits.Instance.EscapeHatches.DoNotTruncateConditions; 2314if (Traits.Instance.UseLazyWildCardEvaluation) 4555if (Traits.Instance.LogPropertyFunctionsRequiringReflection) 5494if (Traits.Instance.EnableAllPropertyFunctions) 5506if (Traits.Instance.EnableAllPropertyFunctions)
Evaluation\LazyItemEvaluator.cs (2)
42private Dictionary<string, LazyItemList> _itemLists = Traits.Instance.EscapeHatches.UseCaseSensitiveItemNames ? 468public ImmutableDictionary<string, LazyItemList>.Builder ReferencedItemLists { get; } = Traits.Instance.EscapeHatches.UseCaseSensitiveItemNames ?
Evaluation\LazyItemEvaluator.IncludeOperation.cs (1)
96bool skipGlob = !_conditionResult && globFragment.IsFullFileSystemScan && !Traits.Instance.EscapeHatches.AlwaysEvaluateDangerousGlobs;
Evaluation\LazyItemEvaluator.RemoveOperation.cs (1)
62if (listBuilder.Count >= Traits.Instance.DictionaryBasedItemRemoveThreshold)
Evaluation\LazyItemEvaluator.UpdateOperation.cs (1)
116&& !Traits.Instance.EscapeHatches.DoNotExpandQualifiedMetadataInUpdateOperation)
Evaluation\ProjectRootElementCache.cs (1)
179if (!Traits.Instance.EscapeHatches.AlwaysDoImmutableFilesUpToDateCheck && FileClassifier.Shared.IsNonModifiable(projectFile))
Evaluation\PropertiesUseTracker.cs (1)
33private bool _warnForUninitializedProperties = BuildParameters.WarnOnUninitializedProperty || Traits.Instance.EscapeHatches.WarnOnUninitializedProperty;
FileMatcher.cs (2)
102if (Traits.Instance.MSBuildCacheFileEnumerations) 2110if (logDriveEnumeratingWildcard && Traits.Instance.ThrowOnDriveEnumeratingWildcard)
FileUtilities.cs (3)
1000return Traits.Instance.CacheFileExistence 1024return Traits.Instance.CacheFileExistence 1048return Traits.Instance.CacheFileExistence
Instance\ProjectInstance.cs (2)
2383var forcedProjectInstanceTranslationMode = Traits.Instance.EscapeHatches.ProjectInstanceTranslation; 3162if (Traits.Instance.EscapeHatches.DebugEvaluation)
Logging\BaseConsoleLogger.cs (1)
953bool logPropertiesAndItemsAfterEvaluation = Traits.Instance.EscapeHatches.LogPropertiesAndItemsAfterEvaluation ?? true;
Logging\BinaryLogger\BinaryLogger.cs (4)
165_initialLogImports = Traits.Instance.EscapeHatches.LogProjectImports; 172Traits.Instance.EscapeHatches.LogProjectImports = true; 173bool logPropertiesAndItemsAfterEvaluation = Traits.Instance.EscapeHatches.LogPropertiesAndItemsAfterEvaluation ?? true; 319Traits.Instance.EscapeHatches.LogProjectImports = _initialLogImports;
Utilities\EngineFileUtilities.cs (4)
29if (Traits.Instance.UseLazyWildCardEvaluation) 209if (Traits.Instance.LogExpandedWildcards) 291if (logDriveEnumeratingWildcard && Traits.Instance.ThrowOnDriveEnumeratingWildcard) 522return Traits.Instance.UseLazyWildCardEvaluation && !forceEvaluateWildCards && MatchesLazyWildcard(filespecEscaped);
Microsoft.Build.Engine.OM.UnitTests (4)
DebugUtils.cs (1)
35if (Traits.Instance.DebugEngine)
FileUtilities.cs (3)
1000return Traits.Instance.CacheFileExistence 1024return Traits.Instance.CacheFileExistence 1048return Traits.Instance.CacheFileExistence
Microsoft.Build.Framework (4)
NativeMethods.cs (4)
593bool isMaxPathRestricted = Traits.Instance.EscapeHatches.DisableLongPaths || IsMaxPathLegacyWindows(); 1157if (Traits.Instance.EscapeHatches.AlwaysDoImmutableFilesUpToDateCheck) 1189if (Traits.Instance.EscapeHatches.AlwaysUseContentTimestamp) 1203if ((data.fileAttributes & FILE_ATTRIBUTE_REPARSE_POINT) == FILE_ATTRIBUTE_REPARSE_POINT && !Traits.Instance.EscapeHatches.UseSymlinkTimeInsteadOfTargetTime)
Microsoft.Build.Tasks.Core (13)
AssemblyDependency\ReferenceTable.cs (1)
3026if (!Traits.Instance.EscapeHatches.TargetPathForRelatedFiles)
AssemblyDependency\ResolveAssemblyReference.cs (1)
2372Traits.Instance.EscapeHatches.CacheAssemblyInformation
Copy.cs (2)
290if (!Traits.Instance.EscapeHatches.CopyWithoutDelete && 1050int parallelism = Traits.Instance.CopyTaskParallelism;
CreateItem.cs (1)
170if (logDriveEnumeratingWildcard && Traits.Instance.ThrowOnDriveEnumeratingWildcard)
DebugUtils.cs (1)
35if (Traits.Instance.DebugEngine)
Exec.cs (1)
591if (!Traits.Instance.EscapeHatches.UseAutoRunWhenLaunchingProcessUnderCmd)
FileMatcher.cs (2)
102if (Traits.Instance.MSBuildCacheFileEnumerations) 2110if (logDriveEnumeratingWildcard && Traits.Instance.ThrowOnDriveEnumeratingWildcard)
FileUtilities.cs (3)
1000return Traits.Instance.CacheFileExistence 1024return Traits.Instance.CacheFileExistence 1048return Traits.Instance.CacheFileExistence
GenerateResource.cs (1)
3023if (Traits.Instance.EscapeHatches.UseMinimalResxParsingInCoreScenarios)
Microsoft.Build.UnitTests.Shared (1)
RunnerUtilities.cs (1)
144if (Traits.Instance.DebugUnitTests)
Microsoft.Build.Utilities.Core (8)
DebugUtils.cs (1)
35if (Traits.Instance.DebugEngine)
FileMatcher.cs (2)
102if (Traits.Instance.MSBuildCacheFileEnumerations) 2110if (logDriveEnumeratingWildcard && Traits.Instance.ThrowOnDriveEnumeratingWildcard)
FileUtilities.cs (3)
1000return Traits.Instance.CacheFileExistence 1024return Traits.Instance.CacheFileExistence 1048return Traits.Instance.CacheFileExistence
ToolTask.cs (2)
1432if (Traits.Instance.EscapeHatches.AvoidUnicodeWhenWritingToolTaskBatch) 1470commandLineCommands = $"{(Traits.Instance.EscapeHatches.UseAutoRunWhenLaunchingProcessUnderCmd ? string.Empty : "/D ")}/C \"{batchFileForCommandLine}\"";
MSBuild (18)
CommandLineSwitches.cs (1)
716if (!unquoteParameter || !Traits.Instance.EscapeHatches.UnquoteTargetSwitchParameters)
CommunicationsUtilities.cs (1)
213private static bool s_trace = Traits.Instance.DebugNodeCommunication;
CoreCLRAssemblyLoader.cs (1)
58if (Traits.Instance.EscapeHatches.UseSingleLoadContext)
DebugUtils.cs (1)
35if (Traits.Instance.DebugEngine)
FileUtilities.cs (3)
1000return Traits.Instance.CacheFileExistence 1024return Traits.Instance.CacheFileExistence 1048return Traits.Instance.CacheFileExistence
OutOfProcTaskHostNode.cs (2)
185_debugCommunications = Traits.Instance.DebugNodeCommunication; 801_shutdownReason = buildComplete.PrepareForReuse && Traits.Instance.EscapeHatches.ReuseTaskHostNodes ? NodeEngineShutdownReason.BuildCompleteReuse : NodeEngineShutdownReason.BuildComplete;
XMake.cs (9)
262!Traits.Instance.EscapeHatches.EnsureStdOutForChildNodesIsPrimaryStdout && 720bool enableRestore = Traits.Instance.EnableRestoreFirst; 1530if (!Traits.Instance.EscapeHatches.DoNotSendDeferredMessagesToBuildManager) 1787if (Traits.Instance.DebugEngine) 2764if (Traits.Instance.DebugEngine) 2854if (Traits.Instance.EscapeHatches.EnsureStdOutForChildNodesIsPrimaryStdout) 3923if (cpuCount == 1 && !Traits.Instance.InProcNodeDisabled) 3993if (cpuCount == 1 && !Traits.Instance.InProcNodeDisabled) 4030if (cpuCount == 1 && !Traits.Instance.InProcNodeDisabled)