Skip to content

Commit fe56f9d

Browse files
bergmeisterdaxian-dbw
authored andcommitted
Upgrade .Net Core 3 SDK from preview5 to preview6 and related out of band Nuget packages from 2.1 to 3.0-preview6 (PowerShell#9888)
1 parent ffc3af2 commit fe56f9d

23 files changed

Lines changed: 930 additions & 148 deletions

File tree

‎assets/files.wxs‎

Lines changed: 900 additions & 6 deletions
Large diffs are not rendered by default.

‎global.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"sdk": {
3-
"version": "3.0.100-preview5-011568"
3+
"version": "3.0.100-preview6-012264"
44
}
55
}

‎src/Microsoft.PowerShell.Commands.Utility/Microsoft.PowerShell.Commands.Utility.csproj‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656

5757
<ItemGroup>
5858
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="3.1.0" />
59-
<PackageReference Include="System.Threading.AccessControl" Version="4.5.0" />
59+
<PackageReference Include="System.Threading.AccessControl" Version="4.6.0-preview6.19303.8" />
6060
<PackageReference Include="NJsonSchema" Version="10.0.21" />
6161
</ItemGroup>
6262

‎src/Microsoft.PowerShell.Commands.Utility/commands/utility/AddMember.cs‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
using System.Collections;
66
using System.Collections.Generic;
77
using System.Collections.ObjectModel;
8-
using System.Diagnostics.CodeAnalysis;
98
using System.Globalization;
109
using System.Management.Automation;
1110
using System.Management.Automation.Host;
@@ -178,7 +177,6 @@ public object NotePropertyValue
178177
/// </summary>
179178
[Parameter(Mandatory = true, Position = 0, ParameterSetName = NotePropertyMultiMemberSet)]
180179
[ValidateNotNullOrEmpty]
181-
[SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
182180
public IDictionary NotePropertyMembers
183181
{
184182
get { return _property; }

‎src/Microsoft.PowerShell.Commands.Utility/commands/utility/AddType.cs‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
using System.Collections.Generic;
77
using System.Collections.Immutable;
88
using System.Collections.ObjectModel;
9-
using System.Diagnostics.CodeAnalysis;
109
using System.Globalization;
1110
using System.IO;
1211
using System.Linq;
@@ -21,15 +20,13 @@
2120
using Microsoft.CodeAnalysis.CSharp;
2221
using Microsoft.CodeAnalysis.Emit;
2322
using Microsoft.CodeAnalysis.Text;
24-
2523
using PathType = System.IO.Path;
2624

2725
namespace Microsoft.PowerShell.Commands
2826
{
2927
/// <summary>
3028
/// Languages supported for code generation.
3129
/// </summary>
32-
[SuppressMessage("Microsoft.Naming", "CA1724:TypeNamesShouldNotMatchNamespaces")]
3330
public enum Language
3431
{
3532
/// <summary>
@@ -98,7 +95,6 @@ public string TypeDefinition
9895
/// The source code of this generated method / member.
9996
/// </summary>
10097
[Parameter(Mandatory = true, Position = 1, ParameterSetName = FromMemberParameterSetName)]
101-
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
10298
public string[] MemberDefinition
10399
{
104100
get
@@ -133,15 +129,13 @@ public string[] MemberDefinition
133129
[Parameter(ParameterSetName = FromMemberParameterSetName)]
134130
[ValidateNotNull()]
135131
[Alias("Using")]
136-
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
137132
public string[] UsingNamespace { get; set; } = Array.Empty<string>();
138133

139134
/// <summary>
140135
/// The path to the source code or DLL to load.
141136
/// </summary>
142137
[Parameter(Mandatory = true, Position = 0, ParameterSetName = FromPathParameterSetName)]
143138
[ValidateTrustedData]
144-
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
145139
public string[] Path
146140
{
147141
get
@@ -189,7 +183,6 @@ public string[] Path
189183
[Parameter(Mandatory = true, ParameterSetName = FromLiteralPathParameterSetName)]
190184
[Alias("PSPath", "LP")]
191185
[ValidateTrustedData]
192-
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
193186
public string[] LiteralPath
194187
{
195188
get
@@ -277,7 +270,6 @@ private void ProcessPaths(List<string> resolvedPaths)
277270
[Parameter(Mandatory = true, ParameterSetName = FromAssemblyNameParameterSetName)]
278271
[Alias("AN")]
279272
[ValidateTrustedData]
280-
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
281273
public string[] AssemblyName { get; set; }
282274

283275
private bool _loadAssembly = false;
@@ -298,7 +290,6 @@ private void ProcessPaths(List<string> resolvedPaths)
298290
[Parameter(ParameterSetName = FromPathParameterSetName)]
299291
[Parameter(ParameterSetName = FromLiteralPathParameterSetName)]
300292
[Alias("RA")]
301-
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
302293
public string[] ReferencedAssemblies
303294
{
304295
get { return _referencedAssemblies; }
@@ -813,7 +804,6 @@ private string ResolveAssemblyName(string assembly, bool isForReferenceAssembly)
813804
// However, this does give us a massive usability improvement, as users can just say
814805
// Add-Type -AssemblyName Forms (instead of System.Windows.Forms)
815806
// This is just long, not unmaintainable.
816-
[SuppressMessage("Microsoft.Maintainability", "CA1505:AvoidUnmaintainableCode")]
817807
private Assembly LoadAssemblyHelper(string assemblyName)
818808
{
819809
Assembly loadedAssembly = null;

‎src/Microsoft.PowerShell.Commands.Utility/commands/utility/ImplicitRemotingCommands.cs‎

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
using System.Collections;
66
using System.Collections.Generic;
77
using System.Collections.ObjectModel;
8-
using System.Diagnostics.CodeAnalysis;
98
using System.Globalization;
109
using System.IO;
1110
using System.Management.Automation;
@@ -21,9 +20,6 @@
2120

2221
using Dbg = System.Management.Automation.Diagnostics;
2322

24-
// FxCop suppressions for resource strings:
25-
[module: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", Scope = "resource", Target = "ImplicitRemotingStrings.resources", MessageId = "runspace")]
26-
[module: SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", Scope = "resource", Target = "ImplicitRemotingStrings.resources", MessageId = "Runspace")]
2723

2824
namespace Microsoft.PowerShell.Commands
2925
{
@@ -347,7 +343,6 @@ internal ImplicitRemotingCommandBase()
347343
/// Gets or sets the path(s) or name(s) of the commands to retrieve.
348344
/// </summary>
349345
[Parameter(Position = 2)]
350-
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
351346
[Alias("Name")]
352347
public string[] CommandName
353348
{
@@ -383,7 +378,6 @@ public string[] CommandName
383378
[AllowNull]
384379
[AllowEmptyCollection]
385380
[Alias("Args")]
386-
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
387381
public object[] ArgumentList
388382
{
389383
get
@@ -425,8 +419,6 @@ public CommandTypes CommandType
425419
/// Gets or sets the PSSnapin parameter to the cmdlet.
426420
/// </summary>
427421
[Parameter]
428-
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
429-
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Snapin")]
430422
[Alias("PSSnapin")]
431423
[ValidateNotNull]
432424
public string[] Module
@@ -455,7 +447,6 @@ public string[] Module
455447
/// Gets or sets the FullyQualifiedModule parameter to the cmdlet.
456448
/// </summary>
457449
[Parameter]
458-
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
459450
[ValidateNotNull]
460451
public ModuleSpecification[] FullyQualifiedModule
461452
{
@@ -488,7 +479,6 @@ public ModuleSpecification[] FullyQualifiedModule
488479
/// <summary>
489480
/// Gets or sets the types for which we should get formatting and output data.
490481
/// </summary>
491-
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
492482
[Parameter(Position = 3)]
493483
public string[] FormatTypeName
494484
{
@@ -534,7 +524,6 @@ public string[] FormatTypeName
534524
/// </summary>
535525
[Parameter(Mandatory = true, Position = 0)]
536526
[ValidateNotNull]
537-
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Runspace")]
538527
public PSSession Session { get; set; }
539528

540529
#endregion Parameters

‎src/Microsoft.PowerShell.Commands.Utility/commands/utility/MatchString.cs‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
using System.Collections;
66
using System.Collections.Generic;
77
using System.Collections.ObjectModel;
8-
using System.Diagnostics.CodeAnalysis;
98
using System.Globalization;
109
using System.IO;
1110
using System.Management.Automation;
@@ -27,29 +26,25 @@ internal MatchInfoContext()
2726
/// <summary>
2827
/// Gets or sets the lines found before a match.
2928
/// </summary>
30-
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
3129
public string[] PreContext { get; set; }
3230

3331
/// <summary>
3432
/// Gets or sets the lines found after a match.
3533
/// </summary>
36-
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
3734
public string[] PostContext { get; set; }
3835

3936
/// <summary>
4037
/// Gets or sets the lines found before a match. Does not include
4138
/// overlapping context and thus can be used to
4239
/// display contiguous match regions.
4340
/// </summary>
44-
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
4541
public string[] DisplayPreContext { get; set; }
4642

4743
/// <summary>
4844
/// Gets or sets the lines found after a match. Does not include
4945
/// overlapping context and thus can be used to
5046
/// display contiguous match regions.
5147
/// </summary>
52-
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
5348
public string[] DisplayPostContext { get; set; }
5449

5550
/// <summary>
@@ -266,7 +261,6 @@ private string FormatLine(string lineStr, int displayLineNumber, string displayP
266261
/// <summary>
267262
/// Gets or sets a list of all Regex matches on the matching line.
268263
/// </summary>
269-
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
270264
public Match[] Matches { get; set; } = new Match[] { };
271265

272266
/// <summary>
@@ -423,7 +417,6 @@ public bool Contains(T item)
423417
throw new NotImplementedException();
424418
}
425419

426-
[SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly")]
427420
public void CopyTo(T[] array, int arrayIndex)
428421
{
429422
if (array == null)
@@ -1006,7 +999,6 @@ public PSObject InputObject
1006999
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = "LiteralFile")]
10071000
[FileinfoToString]
10081001
[Alias("PSPath", "LP")]
1009-
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
10101002
public string[] LiteralPath
10111003
{
10121004
get => Path;

‎src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/ConvertToJsonCommand.cs‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
using System;
55
using System.Collections.Generic;
6-
using System.Diagnostics.CodeAnalysis;
76
using System.Management.Automation;
87
using System.Management.Automation.Internal;
98
using System.Threading;
@@ -17,7 +16,6 @@ namespace Microsoft.PowerShell.Commands
1716
/// This command converts an object to a Json string representation.
1817
/// </summary>
1918
[Cmdlet(VerbsData.ConvertTo, "Json", HelpUri = "https://go.microsoft.com/fwlink/?LinkID=217032", RemotingCapability = RemotingCapability.None)]
20-
[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
2119
public class ConvertToJsonCommand : PSCmdlet
2220
{
2321
/// <summary>

‎src/Microsoft.PowerShell.Commands.Utility/commands/utility/Write.cs‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
// Licensed under the MIT License.
33

44
using System;
5-
using System.Diagnostics.CodeAnalysis;
65
using System.Management.Automation;
76
using System.Management.Automation.Internal;
87
using System.Runtime.Serialization;
@@ -172,7 +171,6 @@ public sealed class WriteInformationCommand : PSCmdlet
172171
/// Any tags to be associated with this information.
173172
/// </summary>
174173
[Parameter(Position = 1)]
175-
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
176174
public string[] Tags { get; set; }
177175

178176
/// <summary>

‎src/Microsoft.PowerShell.Commands.Utility/commands/utility/XmlCommands.cs‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,13 @@
55
using System.Collections;
66
using System.Collections.Generic;
77
using System.Collections.ObjectModel;
8-
using System.Diagnostics.CodeAnalysis;
98
using System.Globalization;
109
using System.IO;
1110
using System.Management.Automation;
1211
using System.Management.Automation.Internal;
1312
using System.Security;
1413
using System.Text;
1514
using System.Xml;
16-
1715
using Dbg = System.Management.Automation.Diagnostics;
1816

1917
namespace Microsoft.PowerShell.Commands
@@ -293,7 +291,6 @@ public sealed class ImportClixmlCommand : PSCmdlet, IDisposable
293291
/// </summary>
294292
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = "ByLiteralPath")]
295293
[Alias("PSPath", "LP")]
296-
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
297294
public string[] LiteralPath
298295
{
299296
get
@@ -811,7 +808,6 @@ public class SelectXmlCommand : PSCmdlet
811808
/// <summary>
812809
/// Specifies the path which contains the xml files. The default is the current user directory.
813810
/// </summary>
814-
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
815811
[Parameter(Position = 1, Mandatory = true,
816812
ValueFromPipelineByPropertyName = true,
817813
ParameterSetName = "Path")]
@@ -821,7 +817,6 @@ public class SelectXmlCommand : PSCmdlet
821817
/// <summary>
822818
/// Specifies the literal path which contains the xml files. The default is the current user directory.
823819
/// </summary>
824-
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
825820
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = "LiteralPath")]
826821
[ValidateNotNullOrEmpty]
827822
[Alias("PSPath", "LP")]
@@ -845,16 +840,13 @@ public string[] LiteralPath
845840
[Parameter(Position = 1, Mandatory = true, ValueFromPipelineByPropertyName = true, ValueFromPipeline = true,
846841
ParameterSetName = "Xml")]
847842
[ValidateNotNullOrEmpty]
848-
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
849-
[SuppressMessage("Microsoft.Design", "CA1059:MembersShouldNotExposeCertainConcreteTypes", MessageId = "System.Xml.XmlNode")]
850843
[Alias("Node")]
851844
public System.Xml.XmlNode[] Xml { get; set; }
852845

853846
/// <summary>
854847
/// The following is the definition of the input parameter in string format.
855848
/// Specifies the string format of a fully qualified xml.
856849
/// </summary>
857-
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
858850
[Parameter(Mandatory = true, ValueFromPipeline = true,
859851
ParameterSetName = "Content")]
860852
[ValidateNotNullOrEmpty]
@@ -874,7 +866,6 @@ public string[] LiteralPath
874866
/// </summary>
875867
[Parameter]
876868
[ValidateNotNullOrEmpty]
877-
[SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
878869
public Hashtable Namespace { get; set; }
879870

880871
#endregion parameters
@@ -1100,7 +1091,6 @@ public sealed class SelectXmlInfo
11001091
/// <summary>
11011092
/// The XmlNode that matches search.
11021093
/// </summary>
1103-
[SuppressMessage("Microsoft.Design", "CA1059:MembersShouldNotExposeCertainConcreteTypes", MessageId = "System.Xml.XmlNode")]
11041094
public XmlNode Node { get; set; }
11051095

11061096
/// <summary>

0 commit comments

Comments
 (0)