diff --git a/eng/Common.globalconfig b/eng/Common.globalconfig index fd878420d57..2a940a335d4 100644 --- a/eng/Common.globalconfig +++ b/eng/Common.globalconfig @@ -711,7 +711,7 @@ dotnet_diagnostic.SA1002.severity = suggestion dotnet_diagnostic.SA1003.severity = none # Documentation line should begin with a space -dotnet_diagnostic.SA1004.severity = suggestion +dotnet_diagnostic.SA1004.severity = warning # Single line comment should begin with a space dotnet_diagnostic.SA1005.severity = suggestion diff --git a/src/Build.OM.UnitTests/ObjectModelRemoting/RemoteProjectsProviderMock/EvaluationLinkMocks/MockProjectItemDefinitionLink.cs b/src/Build.OM.UnitTests/ObjectModelRemoting/RemoteProjectsProviderMock/EvaluationLinkMocks/MockProjectItemDefinitionLink.cs index 4462df28a6f..57a61cef3b5 100644 --- a/src/Build.OM.UnitTests/ObjectModelRemoting/RemoteProjectsProviderMock/EvaluationLinkMocks/MockProjectItemDefinitionLink.cs +++ b/src/Build.OM.UnitTests/ObjectModelRemoting/RemoteProjectsProviderMock/EvaluationLinkMocks/MockProjectItemDefinitionLink.cs @@ -18,7 +18,7 @@ public override ProjectItemDefinition CreateLinkedObject(IImportHolder holder) } - /// ProjectItemDefinitionLink remoting + /// ProjectItemDefinitionLink remoting public MockProjectLinkRemoter Project => this.OwningCollection.Export(this.Source.Project); public string ItemType => this.Source.ItemType; public ICollection Metadata => this.OwningCollection.ExportCollection(this.Source.Metadata); diff --git a/src/Build.OM.UnitTests/ObjectModelRemoting/RemoteProjectsProviderMock/EvaluationLinkMocks/MockProjectItemLink.cs b/src/Build.OM.UnitTests/ObjectModelRemoting/RemoteProjectsProviderMock/EvaluationLinkMocks/MockProjectItemLink.cs index 8bc6637683a..e17f305af80 100644 --- a/src/Build.OM.UnitTests/ObjectModelRemoting/RemoteProjectsProviderMock/EvaluationLinkMocks/MockProjectItemLink.cs +++ b/src/Build.OM.UnitTests/ObjectModelRemoting/RemoteProjectsProviderMock/EvaluationLinkMocks/MockProjectItemLink.cs @@ -19,7 +19,7 @@ public override ProjectItem CreateLinkedObject(IImportHolder holder) } - /// ProjectItemLink remoting + /// ProjectItemLink remoting public MockProjectLinkRemoter Project => this.OwningCollection.Export(this.Source.Project); public MockProjectItemElementLinkRemoter Xml => (MockProjectItemElementLinkRemoter)this.OwningCollection.ExportElement(this.Source.Xml); public string EvaluatedInclude => this.Source.EvaluatedInclude; diff --git a/src/Build.OM.UnitTests/ObjectModelRemoting/RemoteProjectsProviderMock/EvaluationLinkMocks/MockProjectLink.cs b/src/Build.OM.UnitTests/ObjectModelRemoting/RemoteProjectsProviderMock/EvaluationLinkMocks/MockProjectLink.cs index 6f2d2a20899..9b178dee6a3 100644 --- a/src/Build.OM.UnitTests/ObjectModelRemoting/RemoteProjectsProviderMock/EvaluationLinkMocks/MockProjectLink.cs +++ b/src/Build.OM.UnitTests/ObjectModelRemoting/RemoteProjectsProviderMock/EvaluationLinkMocks/MockProjectLink.cs @@ -25,7 +25,7 @@ public override Project CreateLinkedObject(IImportHolder holder) } - /// ProjectLink remoting + /// ProjectLink remoting public MockProjectElementLinkRemoter Xml => this.OwningCollection.ExportElement(this.Source.Xml); public bool ThrowInsteadOfSplittingItemElement { get => this.Source.ThrowInsteadOfSplittingItemElement; set => this.Source.ThrowInsteadOfSplittingItemElement = value; } diff --git a/src/Build.OM.UnitTests/ObjectModelRemoting/RemoteProjectsProviderMock/EvaluationLinkMocks/MockProjectMetadataLink.cs b/src/Build.OM.UnitTests/ObjectModelRemoting/RemoteProjectsProviderMock/EvaluationLinkMocks/MockProjectMetadataLink.cs index d0fe2270eb2..b662f3e277d 100644 --- a/src/Build.OM.UnitTests/ObjectModelRemoting/RemoteProjectsProviderMock/EvaluationLinkMocks/MockProjectMetadataLink.cs +++ b/src/Build.OM.UnitTests/ObjectModelRemoting/RemoteProjectsProviderMock/EvaluationLinkMocks/MockProjectMetadataLink.cs @@ -18,7 +18,7 @@ public override ProjectMetadata CreateLinkedObject(IImportHolder holder) } - /// ProjectMetadataLink remoting + /// ProjectMetadataLink remoting public object Parent { get diff --git a/src/Build.OM.UnitTests/ObjectModelRemoting/RemoteProjectsProviderMock/EvaluationLinkMocks/MockProjectPropertyLink.cs b/src/Build.OM.UnitTests/ObjectModelRemoting/RemoteProjectsProviderMock/EvaluationLinkMocks/MockProjectPropertyLink.cs index 68b725949df..e507f046aad 100644 --- a/src/Build.OM.UnitTests/ObjectModelRemoting/RemoteProjectsProviderMock/EvaluationLinkMocks/MockProjectPropertyLink.cs +++ b/src/Build.OM.UnitTests/ObjectModelRemoting/RemoteProjectsProviderMock/EvaluationLinkMocks/MockProjectPropertyLink.cs @@ -18,7 +18,7 @@ public override ProjectProperty CreateLinkedObject(IImportHolder holder) } - /// ProjectPropertyLink remoting + /// ProjectPropertyLink remoting public MockProjectLinkRemoter Project => this.OwningCollection.Export(this.Source.Project); public MockProjectPropertyElementLinkRemoter Xml => (MockProjectPropertyElementLinkRemoter)this.ExportElement(this.Source.Xml); public string Name => this.Source.Name; diff --git a/src/Build.UnitTests/BackEnd/LoggingServiceFactory_Tests.cs b/src/Build.UnitTests/BackEnd/LoggingServiceFactory_Tests.cs index c69153fc7a2..52d7fe31cfa 100644 --- a/src/Build.UnitTests/BackEnd/LoggingServiceFactory_Tests.cs +++ b/src/Build.UnitTests/BackEnd/LoggingServiceFactory_Tests.cs @@ -10,7 +10,7 @@ namespace Microsoft.Build.UnitTests.Logging { /// - ///Test the Factory to create components of the type LoggingService + /// Test the Factory to create components of the type LoggingService /// public class LoggingServiceFactory_Tests { diff --git a/src/Build/BackEnd/Components/Logging/ILoggingService.cs b/src/Build/BackEnd/Components/Logging/ILoggingService.cs index 7ef991c3e40..bb2fce7940e 100644 --- a/src/Build/BackEnd/Components/Logging/ILoggingService.cs +++ b/src/Build/BackEnd/Components/Logging/ILoggingService.cs @@ -269,7 +269,7 @@ MessageImportance MinimumRequiredMessageImportance /// Register an logger which expects all logging events from the system /// /// The logger to register. - ///True if the central was registered. False if the central logger was already registered + /// True if the central was registered. False if the central logger was already registered bool RegisterLogger(ILogger logger); /// diff --git a/src/Build/BackEnd/Shared/BuildRequestConfiguration.cs b/src/Build/BackEnd/Shared/BuildRequestConfiguration.cs index b1fdcf4e964..c710e135b29 100644 --- a/src/Build/BackEnd/Shared/BuildRequestConfiguration.cs +++ b/src/Build/BackEnd/Shared/BuildRequestConfiguration.cs @@ -123,7 +123,7 @@ internal class BuildRequestConfiguration : IEquatable /// private int _resultsNodeId = Scheduler.InvalidNodeId; - /// + /// /// Holds a snapshot of the environment at the time we blocked. /// private Dictionary _savedEnvironmentVariables; diff --git a/src/Build/Construction/Solution/SolutionProjectGenerator.cs b/src/Build/Construction/Solution/SolutionProjectGenerator.cs index 646deb3b33e..54e23f4f6ce 100644 --- a/src/Build/Construction/Solution/SolutionProjectGenerator.cs +++ b/src/Build/Construction/Solution/SolutionProjectGenerator.cs @@ -1976,9 +1976,9 @@ private void AddValidateProjectsTarget(ProjectInstance traversalProject, List + /// /// Creates the target used to build all of the references in the traversal project. - /// + /// private static void AddTraversalReferencesTarget(ProjectInstance traversalProject, string targetName, string outputItem) { string outputItemAsItem = null; diff --git a/src/Build/Definition/Project.cs b/src/Build/Definition/Project.cs index a0c7648cdd3..26debdd1733 100644 --- a/src/Build/Definition/Project.cs +++ b/src/Build/Definition/Project.cs @@ -857,38 +857,48 @@ public static string GetEvaluatedItemIncludeEscaped(ProjectItemDefinition item) /// /// /// - ///

*.txt

+ /// *.txt

/// - /// (both outside and inside project cone) - /// (both outside and inside project cone) - /// - /// - /// - /// - /// (If Bar has globs, they will have been included when querying Bar ProjectItems for globs) - /// - ///
+ /// (both outside and inside project cone) + /// (both outside and inside project cone) + /// + /// + /// + /// + /// (If Bar has globs, they will have been included when querying Bar ProjectItems for globs) + /// + /// ]]> + /// /// - ///Example result: - ///[ - ///GlobResult(glob: "C:\**\*.foo", exclude: []), - ///GlobResult(glob: ["*.a", "*.b"], exclude=["3.a"], remove=["2.a"]), - ///GlobResult(glob: "**\*.b", exclude=["1.b, **\obj\*.b", **\bar\*.b"]), - ///GlobResult(glob: "*.txt", exclude=[]), - ///GlobResult(glob: "*.a", exclude=[]), - ///GlobResult(glob: "*.cs", exclude=["bar"]) - ///]. + /// Example result: + /// + /// + /// ///
/// + /// /// is a that combines all globs in the include element and ignores /// all the fragments in the exclude attribute and all the fragments in all Remove elements that apply to the include element. + /// /// /// Users can construct a composite glob that incorporates all the globs in the Project: /// + /// r.MSBuildGlob).ToArray()); /// uberGlob.IsMatch("foo.cs"); + /// ]]> /// - /// + /// /// /// /// List of . diff --git a/src/Build/Evaluation/IntrinsicFunctions.cs b/src/Build/Evaluation/IntrinsicFunctions.cs index f2aa07d6f5d..3217e7ffe98 100644 --- a/src/Build/Evaluation/IntrinsicFunctions.cs +++ b/src/Build/Evaluation/IntrinsicFunctions.cs @@ -350,7 +350,7 @@ internal static string ValueOrDefault(string conditionValue, string defaultValue } } - /// + /// /// Hash the string independent of bitness and target framework. /// internal static int StableStringHash(string toHash) diff --git a/src/Framework/BuildEventContext.cs b/src/Framework/BuildEventContext.cs index 52693a4fa70..15b70dfb56e 100644 --- a/src/Framework/BuildEventContext.cs +++ b/src/Framework/BuildEventContext.cs @@ -27,7 +27,7 @@ public class BuildEventContext private readonly int _targetId; /// - ///The node-unique project request context the event was in + /// The node-unique project request context the event was in /// private readonly int _projectContextId; diff --git a/src/Framework/Sdk/SdkResolver.cs b/src/Framework/Sdk/SdkResolver.cs index 28c1774f028..728bc476bf3 100644 --- a/src/Framework/Sdk/SdkResolver.cs +++ b/src/Framework/Sdk/SdkResolver.cs @@ -6,40 +6,41 @@ namespace Microsoft.Build.Framework { /// - /// An abstract interface for classes that can resolve a Software Development Kit (SDK). + /// An abstract interface for classes that can resolve a Software Development Kit (SDK). /// public abstract class SdkResolver { /// - /// Name of the SDK resolver to be displayed in build output log. + /// Gets the name of the to be displayed in build output log. /// public abstract string Name { get; } /// - /// Gets the self-described resolution priority order. MSBuild will sort resolvers - /// by this value. + /// Gets the self-described resolution priority order. MSBuild will sort resolvers + /// by this value. /// public abstract int Priority { get; } /// - /// Resolves the specified SDK reference. + /// Resolves the specified SDK reference. /// /// A containing the referenced SDKs be resolved. /// Context for resolving the SDK. /// Factory class to create an /// - /// An containing the resolved SDKs or associated error / reason - /// the SDK could not be resolved. Return null if the resolver is not - /// applicable for a particular . - /// - /// containing the resolved SDKs or associated error / reason + /// the SDK could not be resolved. Return null if the resolver is not + /// applicable for a particular . + /// + /// [!NOTE] /// > You must use the to return a result. /// ]]> /// /// - public abstract SdkResult Resolve(SdkReference sdkReference, SdkResolverContext resolverContext, - SdkResultFactory factory); + public abstract SdkResult Resolve(SdkReference sdkReference, + SdkResolverContext resolverContext, + SdkResultFactory factory); } } diff --git a/src/Tasks.UnitTests/AssemblyDependency/Miscellaneous.cs b/src/Tasks.UnitTests/AssemblyDependency/Miscellaneous.cs index 43d5d72d66d..a69704f841f 100644 --- a/src/Tasks.UnitTests/AssemblyDependency/Miscellaneous.cs +++ b/src/Tasks.UnitTests/AssemblyDependency/Miscellaneous.cs @@ -7103,7 +7103,7 @@ public void TestProfileAndSubset2() /// Verify setting certain combinations of Profile parameters will case an error to be logged and rar to fail execution. /// /// Test the case where the profile name is not set and ProfileFullFrameworkFolders is set. - /// + /// [Fact] public void TestProfileParameterCombinations() { @@ -7118,7 +7118,7 @@ public void TestProfileParameterCombinations() /// /// Verify when the frameworkdirectory metadata is not set on the ProfileFullFrameworkAssemblyTables that an /// error is logged and rar fails. - /// + /// [Fact] public void TestFrameworkDirectoryMetadata() { @@ -7179,7 +7179,7 @@ private void InitializeMockEngine(out ReferenceTable referenceTable, out MockEng } /// - ///Initialize the black list and use it to remove references from the reference table + /// Initialize the black list and use it to remove references from the reference table /// private void InitializeExclusionList(ReferenceTable referenceTable, AssemblyNameExtension[] assembliesForBlackList, out Dictionary blackList) { @@ -7741,19 +7741,24 @@ public void Regress397129_HandleInvalidDirectoriesAndFiles_Case2() Execute(t); } + /// /// Consider this dependency chain: /// /// App - /// References - A - /// Depends on B - /// Will be found by hintpath. - /// References -B - /// No hintpath - /// Exists in A.dll's folder. - /// + /// + /// + /// /// B.dll should be unresolved even though its in A's folder because primary resolution needs to work /// without looking at dependencies because of the load-time perf scenarios don't look at dependencies. /// We must be consistent between primaries resolved with FindDependencies=true and FindDependencies=false. + /// [Fact] public void ByDesignRelatedTo454863_PrimaryReferencesDontResolveToParentFolders() { diff --git a/src/Tasks.UnitTests/AssemblyDependency/SpecificVersionPrimary.cs b/src/Tasks.UnitTests/AssemblyDependency/SpecificVersionPrimary.cs index 87525b05834..5a9399898b1 100644 --- a/src/Tasks.UnitTests/AssemblyDependency/SpecificVersionPrimary.cs +++ b/src/Tasks.UnitTests/AssemblyDependency/SpecificVersionPrimary.cs @@ -80,19 +80,29 @@ public void Exists() /// /// In this case, - /// - A single primary version-strict reference was passed in to assembly version 1.0.0.0 - /// - An app.config was passed in that promotes a *different* assembly version name from - // 1.0.0.0 to 2.0.0.0 - /// - Version 1.0.0.0 of the file exists. - /// - Version 2.0.0.0 of the file exists. + /// + /// A single primary version-strict reference was passed in to assembly version 1.0.0.0 + /// + /// An app.config was passed in that promotes a *different* assembly version name from + /// 1.0.0.0 to 2.0.0.0 + /// + /// Version 1.0.0.0 of the file exists. + /// Version 2.0.0.0 of the file exists. + /// /// Expected: - /// -- The resulting assembly returned should be 1.0.0.0. + /// + /// The resulting assembly returned should be 1.0.0.0. + /// /// Rationale: /// Primary references are never unified. This is because: - /// (a) The user expects that a primary reference will be respected. - /// (b) When FindDependencies is false and AutoUnify is true, we'd have to find all - /// dependencies anyway to make things work consistently. This would be a significant - /// perf hit when loading large solutions. + /// + /// + /// The user expects that a primary reference will be respected. + /// When FindDependencies is false and AutoUnify is true, we'd have to find all + /// dependencies anyway to make things work consistently. This would be a significant + /// perf hit when loading large solutions. + /// + /// /// [Fact] [Trait("Category", "mono-osx-failing")] diff --git a/src/Tasks/FindInvalidProjectReferences.cs b/src/Tasks/FindInvalidProjectReferences.cs index 965bf6d2633..84a92a0147a 100644 --- a/src/Tasks/FindInvalidProjectReferences.cs +++ b/src/Tasks/FindInvalidProjectReferences.cs @@ -17,7 +17,7 @@ public class FindInvalidProjectReferences : TaskExtension { #region Fields - /// + /// /// Regex for breaking up the platform moniker /// Example: XNA, Version=8.0 /// diff --git a/src/Tasks/InstalledSDKResolver.cs b/src/Tasks/InstalledSDKResolver.cs index 16d4332828c..58b97e46883 100644 --- a/src/Tasks/InstalledSDKResolver.cs +++ b/src/Tasks/InstalledSDKResolver.cs @@ -12,7 +12,7 @@ namespace Microsoft.Build.Tasks { /// - ///There is no search path element because the only way to get this resolver is by having the SDKName metadata on the reference. + /// There is no search path element because the only way to get this resolver is by having the SDKName metadata on the reference. /// internal class InstalledSDKResolver : Resolver { diff --git a/src/Tasks/ResolveSDKReference.cs b/src/Tasks/ResolveSDKReference.cs index 1a489c2c402..7331980d82e 100644 --- a/src/Tasks/ResolveSDKReference.cs +++ b/src/Tasks/ResolveSDKReference.cs @@ -23,7 +23,7 @@ public class ResolveSDKReference : TaskExtension { #region fields - /// + /// /// Regex for breaking up the sdk reference include into pieces. /// Example: XNA, Version=8.0 /// diff --git a/src/Tasks/RoslynCodeTaskFactory/RoslynCodeTaskFactory.cs b/src/Tasks/RoslynCodeTaskFactory/RoslynCodeTaskFactory.cs index d48f5ac697a..ec48b416e19 100644 --- a/src/Tasks/RoslynCodeTaskFactory/RoslynCodeTaskFactory.cs +++ b/src/Tasks/RoslynCodeTaskFactory/RoslynCodeTaskFactory.cs @@ -258,27 +258,29 @@ internal static string GetSourceCode(RoslynCodeTaskFactoryTaskInfo taskInfo, ICo } } - /// - /// Parses and validates the body of the <UsingTask />. - /// - /// A used to log events during parsing. - /// The name of the task. - /// The raw inner XML string of the <UsingTask />> to parse and validate. + /// + /// Parses and validates the body of the <UsingTask />. + /// + /// A used to log events during parsing. + /// The name of the task. + /// The raw inner XML string of the <UsingTask />> to parse and validate. /// An containing parameters for the task. /// A object that receives the details of the parsed task. - /// true if the task body was successfully parsed, otherwise false. - /// - /// The will look like this: - /// true if the task body was successfully parsed, otherwise false. + /// + /// The will look like this: + /// + /// - /// - /// - /// // Source code - /// + /// + /// + /// + /// // Source code + /// /// - /// ]]> - /// + /// ]]> + /// + /// internal static bool TryLoadTaskBody(TaskLoggingHelper log, string taskName, string taskBody, ICollection parameters, out RoslynCodeTaskFactoryTaskInfo taskInfo) { taskInfo = new RoslynCodeTaskFactoryTaskInfo