diff --git a/.editorconfig b/.editorconfig
index 517c9656ba..dd8d63862a 100644
--- a/.editorconfig
+++ b/.editorconfig
@@ -114,6 +114,8 @@ dotnet_style_prefer_conditional_expression_over_return = true:silent
dotnet_style_prefer_conditional_expression_over_assignment = true:silent
dotnet_style_prefer_auto_properties = true:suggestion
csharp_prefer_simple_default_expression = true:suggestion
+dotnet_style_prefer_compound_assignment = false:silent
+dotnet_diagnostic.IDE0031.severity = none
dotnet_code_quality_unused_parameters = non_public:suggestion
diff --git a/assets/wix/files.wxs b/assets/wix/files.wxs
index 80855b7a4c..fc5cc5d8f1 100644
--- a/assets/wix/files.wxs
+++ b/assets/wix/files.wxs
@@ -3154,8 +3154,8 @@
-
-
+
+
@@ -4173,7 +4173,7 @@
-
+
diff --git a/global.json b/global.json
index 83219bb570..ef5ea15324 100644
--- a/global.json
+++ b/global.json
@@ -1,5 +1,5 @@
{
"sdk": {
- "version": "6.0.303"
+ "version": "6.0.401"
}
}
diff --git a/src/System.Management.Automation/System.Management.Automation.csproj b/src/System.Management.Automation/System.Management.Automation.csproj
index dce17fb82a..03873692a1 100644
--- a/src/System.Management.Automation/System.Management.Automation.csproj
+++ b/src/System.Management.Automation/System.Management.Automation.csproj
@@ -17,7 +17,7 @@
-
+
diff --git a/src/System.Management.Automation/singleshell/config/MshSnapinInfo.cs b/src/System.Management.Automation/singleshell/config/MshSnapinInfo.cs
index b7e5d60f00..9fd26853bb 100644
--- a/src/System.Management.Automation/singleshell/config/MshSnapinInfo.cs
+++ b/src/System.Management.Automation/singleshell/config/MshSnapinInfo.cs
@@ -1296,7 +1296,9 @@ namespace System.Management.Automation
{
lock (s_syncObject)
{
+#pragma warning disable IDE0074 // Disabling the rule because it can't be applied on non Unix
if (s_defaultMshSnapins == null)
+#pragma warning restore IDE0074
{
s_defaultMshSnapins = new List()
{
diff --git a/src/System.Management.Automation/utils/tracing/PSSysLogProvider.cs b/src/System.Management.Automation/utils/tracing/PSSysLogProvider.cs
index 011d757723..5a55d2f4cc 100755
--- a/src/System.Management.Automation/utils/tracing/PSSysLogProvider.cs
+++ b/src/System.Management.Automation/utils/tracing/PSSysLogProvider.cs
@@ -49,11 +49,8 @@ namespace System.Management.Automation.Tracing
{
get
{
- if (t_payloadBuilder == null)
- {
- // NOTE: Thread static fields must be explicitly initialized for each thread.
- t_payloadBuilder = new StringBuilder(200);
- }
+ // NOTE: Thread static fields must be explicitly initialized for each thread.
+ t_payloadBuilder ??= new StringBuilder(200);
return t_payloadBuilder;
}
diff --git a/src/System.Management.Automation/utils/tracing/SysLogProvider.cs b/src/System.Management.Automation/utils/tracing/SysLogProvider.cs
index 27d0e133fd..9e27d75770 100755
--- a/src/System.Management.Automation/utils/tracing/SysLogProvider.cs
+++ b/src/System.Management.Automation/utils/tracing/SysLogProvider.cs
@@ -130,11 +130,8 @@ namespace System.Management.Automation.Tracing
{
get
{
- if (t_messageBuilder == null)
- {
- // NOTE: Thread static fields must be explicitly initialized for each thread.
- t_messageBuilder = new StringBuilder(200);
- }
+ // NOTE: Thread static fields must be explicitly initialized for each thread.
+ t_messageBuilder ??= new StringBuilder(200);
return t_messageBuilder;
}
@@ -201,10 +198,7 @@ namespace System.Management.Automation.Tracing
{
get
{
- if (_resourceManager is null)
- {
- _resourceManager = new global::System.Resources.ResourceManager("System.Management.Automation.resources.EventResource", typeof(EventResource).Assembly);
- }
+ _resourceManager ??= new global::System.Resources.ResourceManager("System.Management.Automation.resources.EventResource", typeof(EventResource).Assembly);
return _resourceManager;
}
diff --git a/test/perf/dotnet-tools/Reporting/Reporting.csproj b/test/perf/dotnet-tools/Reporting/Reporting.csproj
index e0d2f3b824..70447cf5d7 100644
--- a/test/perf/dotnet-tools/Reporting/Reporting.csproj
+++ b/test/perf/dotnet-tools/Reporting/Reporting.csproj
@@ -6,7 +6,7 @@
-
+
diff --git a/test/perf/dotnet-tools/ResultsComparer/ResultsComparer.csproj b/test/perf/dotnet-tools/ResultsComparer/ResultsComparer.csproj
index 838d6ccd67..7659e6e02c 100644
--- a/test/perf/dotnet-tools/ResultsComparer/ResultsComparer.csproj
+++ b/test/perf/dotnet-tools/ResultsComparer/ResultsComparer.csproj
@@ -8,7 +8,7 @@
-
+
diff --git a/test/tools/WebListener/Controllers/RetryController.cs b/test/tools/WebListener/Controllers/RetryController.cs
index 00a0bcd990..f9f93bae4c 100644
--- a/test/tools/WebListener/Controllers/RetryController.cs
+++ b/test/tools/WebListener/Controllers/RetryController.cs
@@ -23,10 +23,7 @@ namespace mvc.Controllers
public JsonResult Retry(string sessionId, int failureCode, int failureCount)
{
- if (retryInfo == null)
- {
- retryInfo = new Dictionary>();
- }
+ retryInfo ??= new Dictionary>();
if (retryInfo.TryGetValue(sessionId, out Tuple retry))
{
diff --git a/test/tools/WebListener/WebListener.csproj b/test/tools/WebListener/WebListener.csproj
index bbc07be525..3c694d9a02 100644
--- a/test/tools/WebListener/WebListener.csproj
+++ b/test/tools/WebListener/WebListener.csproj
@@ -7,7 +7,7 @@
-
+
diff --git a/tools/cgmanifest.json b/tools/cgmanifest.json
index 6ff1ba7f9d..b71356fc98 100644
--- a/tools/cgmanifest.json
+++ b/tools/cgmanifest.json
@@ -755,7 +755,7 @@
"Type": "nuget",
"Nuget": {
"Name": "System.Configuration.ConfigurationManager",
- "Version": "6.0.0"
+ "Version": "6.0.1"
}
},
"DevelopmentDependency": false