From ad344dcbe9f7ee96eeafae5b639257f161a8ba39 Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Fri, 21 Jan 2022 09:53:34 +0200 Subject: [PATCH 01/13] Change globalPackagesFolder --- NuGet.config | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/NuGet.config b/NuGet.config index 9b4c6f6759c..2b871a91f72 100644 --- a/NuGet.config +++ b/NuGet.config @@ -1,5 +1,9 @@ + + + + From 25973bc945d42bf9b3ae23c8c4ac03f954dcd064 Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Fri, 21 Jan 2022 09:54:36 +0200 Subject: [PATCH 02/13] Update .editorconfig --- .editorconfig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.editorconfig b/.editorconfig index 5311eb964aa..234c927d8d3 100644 --- a/.editorconfig +++ b/.editorconfig @@ -202,3 +202,7 @@ end_of_line = crlf [src/**/*.{cs,vb}] # IDE0005: Remove unnecessary usings/imports dotnet_diagnostic.IDE0005.severity = warning + +[.nuget/**/*.cs] +# Instantiate argument exceptions correctly +dotnet_diagnostic.CA2208.severity = suggestion From ac252ef2ab226d18028e8a683a9a78979aa396f6 Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Fri, 21 Jan 2022 09:55:09 +0200 Subject: [PATCH 03/13] Update Common.globalconfig --- eng/Common.globalconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/Common.globalconfig b/eng/Common.globalconfig index cb71d55758c..f8c199d9c6c 100644 --- a/eng/Common.globalconfig +++ b/eng/Common.globalconfig @@ -373,7 +373,7 @@ dotnet_diagnostic.CA2153.severity = none dotnet_diagnostic.CA2201.severity = none # Instantiate argument exceptions correctly -dotnet_diagnostic.CA2208.severity = suggestion +dotnet_diagnostic.CA2208.severity = warning # Non-constant fields should not be visible dotnet_diagnostic.CA2211.severity = none @@ -1107,4 +1107,4 @@ dotnet_diagnostic.SA1649.severity = suggestion dotnet_diagnostic.SA1652.severity = none # Do not use equality check to check for collection size. -dotnet_diagnostic.xUnit2013.severity = none \ No newline at end of file +dotnet_diagnostic.xUnit2013.severity = none From d1c9f1472bf306d7a5c6a5e4cac290a962c35f86 Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Fri, 21 Jan 2022 09:55:49 +0200 Subject: [PATCH 04/13] Update TransientIO.cs --- src/Build.OM.UnitTests/TransientIO.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Build.OM.UnitTests/TransientIO.cs b/src/Build.OM.UnitTests/TransientIO.cs index 982474d02ea..efdf7a97cff 100644 --- a/src/Build.OM.UnitTests/TransientIO.cs +++ b/src/Build.OM.UnitTests/TransientIO.cs @@ -79,7 +79,7 @@ public string GetAbsolutePath(string relative) var absolute = Path.GetFullPath(Path.IsPathRooted(relative) ? relative : Path.Combine(tempRoot, relative)); if (!IsControled(absolute)) { - throw new ArgumentException(nameof(relative)); + throw new ArgumentException("Either the path is invalid or it is not rooted to RootFolder.", nameof(relative)); } return absolute; From 5e5303ddd1211f7f7384e34077805e5cbf37b2eb Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Fri, 21 Jan 2022 09:56:24 +0200 Subject: [PATCH 05/13] Update InternableString.Simple.cs --- src/StringTools/InternableString.Simple.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/StringTools/InternableString.Simple.cs b/src/StringTools/InternableString.Simple.cs index 88126da5c6f..9ef590be148 100644 --- a/src/StringTools/InternableString.Simple.cs +++ b/src/StringTools/InternableString.Simple.cs @@ -20,7 +20,8 @@ public static string AsSpan(this T[] array, int start, int length) { return new string(charArray, start, length); } - throw new ArgumentException(nameof(array)); + + throw new ArgumentException("array is not char array.", nameof(array)); } } } From 38baeec97cf5afebf7b7de5a496da7c5104abb1b Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Fri, 21 Jan 2022 09:56:52 +0200 Subject: [PATCH 06/13] Update TrustInfo.cs --- src/Tasks/ManifestUtil/TrustInfo.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Tasks/ManifestUtil/TrustInfo.cs b/src/Tasks/ManifestUtil/TrustInfo.cs index ce5a2b4843e..e0e3bc08a4c 100644 --- a/src/Tasks/ManifestUtil/TrustInfo.cs +++ b/src/Tasks/ManifestUtil/TrustInfo.cs @@ -412,7 +412,7 @@ public bool IsFullTrust public PermissionSet PermissionSet { get => GetOutputPermissionSet(); - set => _outputPermissionSet = value ?? throw new ArgumentNullException("PermissionSet cannot be set to null."); + set => _outputPermissionSet = value ?? throw new ArgumentNullException(nameof(value), "PermissionSet cannot be set to null."); } #endif From 4865686bb67d488efc8d1a94648d250913eac112 Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Fri, 21 Jan 2022 10:10:29 +0200 Subject: [PATCH 07/13] Update .vsts-dotnet.yml --- .vsts-dotnet.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.vsts-dotnet.yml b/.vsts-dotnet.yml index c6ed508dfc8..d09e435169f 100644 --- a/.vsts-dotnet.yml +++ b/.vsts-dotnet.yml @@ -36,6 +36,8 @@ variables: value: .NETCore - name: _DotNetValidationArtifactsCategory value: .NETCoreValidation + - name: NUGET_PACKAGES + value: ${{Build.SourcesDirectory}}/.nuget/packages stages: - stage: build From 0cc128f84055e17e32735a2806d4a735fe6fdc74 Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Fri, 21 Jan 2022 10:11:11 +0200 Subject: [PATCH 08/13] Update .vsts-dotnet.yml --- .vsts-dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vsts-dotnet.yml b/.vsts-dotnet.yml index d09e435169f..60ebf493811 100644 --- a/.vsts-dotnet.yml +++ b/.vsts-dotnet.yml @@ -37,7 +37,7 @@ variables: - name: _DotNetValidationArtifactsCategory value: .NETCoreValidation - name: NUGET_PACKAGES - value: ${{Build.SourcesDirectory}}/.nuget/packages + value: ${Build.SourcesDirectory}/.nuget/packages stages: - stage: build From 01480f0e330068f2201190231b68382c18b9a6f9 Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Fri, 21 Jan 2022 10:28:54 +0200 Subject: [PATCH 09/13] Update .vsts-dotnet-ci.yml --- .vsts-dotnet-ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.vsts-dotnet-ci.yml b/.vsts-dotnet-ci.yml index dce7ac92550..635f695b6f4 100644 --- a/.vsts-dotnet-ci.yml +++ b/.vsts-dotnet-ci.yml @@ -3,6 +3,10 @@ trigger: - exp/* - vs* +variables: + - name: NUGET_PACKAGES + value: ${Build.SourcesDirectory}/.nuget/packages + jobs: - job: BootstrapMSBuildOnFullFrameworkWindows displayName: "Windows Full" From 92419b1c09b39e97283ce818045819b9e7c04af8 Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Fri, 21 Jan 2022 10:33:57 +0200 Subject: [PATCH 10/13] Update .vsts-dotnet-ci.yml --- .vsts-dotnet-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vsts-dotnet-ci.yml b/.vsts-dotnet-ci.yml index 635f695b6f4..5d7c893c75a 100644 --- a/.vsts-dotnet-ci.yml +++ b/.vsts-dotnet-ci.yml @@ -5,7 +5,7 @@ trigger: variables: - name: NUGET_PACKAGES - value: ${Build.SourcesDirectory}/.nuget/packages + value: ${{Build.SourcesDirectory}}/.nuget/packages jobs: - job: BootstrapMSBuildOnFullFrameworkWindows From cb7caab0bd78b23b50f1a1afa08a981095419c1f Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Fri, 21 Jan 2022 10:37:33 +0200 Subject: [PATCH 11/13] Update .vsts-dotnet.yml --- .vsts-dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vsts-dotnet.yml b/.vsts-dotnet.yml index 60ebf493811..d09e435169f 100644 --- a/.vsts-dotnet.yml +++ b/.vsts-dotnet.yml @@ -37,7 +37,7 @@ variables: - name: _DotNetValidationArtifactsCategory value: .NETCoreValidation - name: NUGET_PACKAGES - value: ${Build.SourcesDirectory}/.nuget/packages + value: ${{Build.SourcesDirectory}}/.nuget/packages stages: - stage: build From c237f35a53e43617f937b3ea6a225597c8699ed0 Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Fri, 21 Jan 2022 10:39:25 +0200 Subject: [PATCH 12/13] Update .vsts-dotnet-ci.yml --- .vsts-dotnet-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vsts-dotnet-ci.yml b/.vsts-dotnet-ci.yml index 5d7c893c75a..f1ad1ed0893 100644 --- a/.vsts-dotnet-ci.yml +++ b/.vsts-dotnet-ci.yml @@ -5,7 +5,7 @@ trigger: variables: - name: NUGET_PACKAGES - value: ${{Build.SourcesDirectory}}/.nuget/packages + value: $(Build.SourcesDirectory)/.nuget/packages jobs: - job: BootstrapMSBuildOnFullFrameworkWindows From a795b6f1ed5000197fc68b4cbd450aa7b8d729ec Mon Sep 17 00:00:00 2001 From: Youssef Victor Date: Fri, 21 Jan 2022 10:39:44 +0200 Subject: [PATCH 13/13] Update .vsts-dotnet.yml --- .vsts-dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vsts-dotnet.yml b/.vsts-dotnet.yml index d09e435169f..697d43b3092 100644 --- a/.vsts-dotnet.yml +++ b/.vsts-dotnet.yml @@ -37,7 +37,7 @@ variables: - name: _DotNetValidationArtifactsCategory value: .NETCoreValidation - name: NUGET_PACKAGES - value: ${{Build.SourcesDirectory}}/.nuget/packages + value: $(Build.SourcesDirectory)/.nuget/packages stages: - stage: build