Skip to content

Commit e97105b

Browse files
authored
Move build to .NET 8 preview 6 (PowerShell#19991)
1 parent 6a950e5 commit e97105b

19 files changed

Lines changed: 30 additions & 52 deletions

File tree

.vsts-ci/windows/windows-packaging.yml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,6 @@ stages:
8080
parameters:
8181
channel: preview
8282
architecture: x86
83-
- template: templates/windows-packaging.yml
84-
parameters:
85-
channel: preview
86-
architecture: arm
87-
runtimePrefix: win
8883
- template: templates/windows-packaging.yml
8984
parameters:
9085
channel: preview

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": "8.0.100-preview.4.23260.5"
3+
"version": "8.0.100-preview.6.23330.14"
44
}
55
}

src/Microsoft.PowerShell.Commands.Utility/commands/utility/WebCmdlet/Common/WebRequestPSCmdlet.Common.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -734,7 +734,7 @@ protected override void ProcessRecord()
734734

735735
/// <summary>
736736
/// Disposes the associated WebSession if it is not being used as part of a persistent session.
737-
/// </summary>
737+
/// </summary>
738738
/// <param name="disposing">True when called from Dispose() and false when called from finalizer.</param>
739739
protected virtual void Dispose(bool disposing)
740740
{
@@ -752,7 +752,7 @@ protected virtual void Dispose(bool disposing)
752752

753753
/// <summary>
754754
/// Disposes the associated WebSession if it is not being used as part of a persistent session.
755-
/// </summary>
755+
/// </summary>
756756
public void Dispose()
757757
{
758758
Dispose(disposing: true);
@@ -1716,7 +1716,7 @@ internal void ParseLinkHeader(HttpResponseMessage response)
17161716
/// <param name="fieldValue">The Field Value to use.</param>
17171717
/// <param name="formData">The <see cref="MultipartFormDataContent"/> to update.</param>
17181718
/// <param name="enumerate">If true, collection types in <paramref name="fieldValue"/> will be enumerated. If false, collections will be treated as single value.</param>
1719-
private void AddMultipartContent(object fieldName, object fieldValue, MultipartFormDataContent formData, bool enumerate)
1719+
private static void AddMultipartContent(object fieldName, object fieldValue, MultipartFormDataContent formData, bool enumerate)
17201720
{
17211721
ArgumentNullException.ThrowIfNull(formData);
17221722

src/Microsoft.PowerShell.ConsoleHost/host/msh/PendingProgress.cs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -458,9 +458,7 @@ internal override
458458
/// <returns>
459459
/// The found node, or null if no suitable node was located.
460460
/// </returns>
461-
private
462-
ProgressNode
463-
FindOldestNodeOfGivenStyle(ArrayList nodes, int oldestSoFar, ProgressNode.RenderStyle style)
461+
private static ProgressNode FindOldestNodeOfGivenStyle(ArrayList nodes, int oldestSoFar, ProgressNode.RenderStyle style)
464462
{
465463
if (nodes == null)
466464
{
@@ -631,9 +629,7 @@ internal override
631629
/// <param name="rawUI">
632630
/// The PSHostRawUserInterface used to gauge string widths in the rendering.
633631
/// </param>
634-
private
635-
void
636-
RenderHelper(ArrayList strings, ArrayList nodes, int indentation, int maxWidth, PSHostRawUserInterface rawUI)
632+
private static void RenderHelper(ArrayList strings, ArrayList nodes, int indentation, int maxWidth, PSHostRawUserInterface rawUI)
637633
{
638634
Dbg.Assert(strings != null, "strings should not be null");
639635
Dbg.Assert(nodes != null, "nodes should not be null");
@@ -721,9 +717,7 @@ private int TallyHeight(PSHostRawUserInterface rawUi, int maxHeight, int maxWidt
721717
/// <param name="nodes"></param>
722718
/// <param name="style"></param>
723719
/// <returns></returns>
724-
private
725-
bool
726-
AllNodesHaveGivenStyle(ArrayList nodes, ProgressNode.RenderStyle style)
720+
private static bool AllNodesHaveGivenStyle(ArrayList nodes, ProgressNode.RenderStyle style)
727721
{
728722
if (nodes == null)
729723
{

src/System.Management.Automation/engine/ComInterop/VarEnumSelector.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ private static bool TryGetPrimitiveComTypeViaConversion(Type argumentType, out V
352352
// We will try VT_DISPATCH and then call GetNativeVariantForObject.
353353
private const VarEnum VT_DEFAULT = VarEnum.VT_RECORD;
354354

355-
private VarEnum GetComType(ref Type argumentType)
355+
private static VarEnum GetComType(ref Type argumentType)
356356
{
357357
if (argumentType == typeof(Missing))
358358
{
@@ -431,7 +431,7 @@ private VarEnum GetComType(ref Type argumentType)
431431
/// <summary>
432432
/// Get the COM Variant type that argument should be marshalled as for a call to COM.
433433
/// </summary>
434-
private VariantBuilder GetVariantBuilder(Type argumentType)
434+
private static VariantBuilder GetVariantBuilder(Type argumentType)
435435
{
436436
//argumentType is coming from MarshalType, null means the dynamic object holds
437437
//a null value and not byref

src/System.Management.Automation/engine/Interop/Windows/FindFirstFile.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ internal unsafe struct WIN32_FIND_DATA
4141

4242
internal sealed class SafeFindHandle : SafeHandleZeroOrMinusOneIsInvalid
4343
{
44-
private SafeFindHandle() : base(true) { }
44+
// .NET 8 requires the default constructor to be public
45+
public SafeFindHandle() : base(true) { }
4546

4647
protected override bool ReleaseHandle()
4748
{

src/System.Management.Automation/engine/Modules/RemoveModuleCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ private bool ModuleProvidesCurrentSessionDrive(PSModuleInfo module)
291291
return false;
292292
}
293293

294-
private void GetAllNestedModules(PSModuleInfo module, ref List<PSModuleInfo> nestedModulesWithNoCircularReference)
294+
private static void GetAllNestedModules(PSModuleInfo module, ref List<PSModuleInfo> nestedModulesWithNoCircularReference)
295295
{
296296
List<PSModuleInfo> nestedModules = new List<PSModuleInfo>();
297297
if (module.NestedModules != null && module.NestedModules.Count > 0)

src/System.Management.Automation/engine/Modules/ScriptAnalysis.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ public override AstVisitAction VisitCommand(CommandAst commandAst)
431431
return AstVisitAction.SkipChildren;
432432
}
433433

434-
private void ProcessCmdletArguments(object value, Action<string> onEachArgument)
434+
private static void ProcessCmdletArguments(object value, Action<string> onEachArgument)
435435
{
436436
if (value == null)
437437
{

src/System.Management.Automation/engine/TypeTable.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1804,7 +1804,7 @@ internal TypeTableLoadException(ConcurrentBag<string> loadErrors)
18041804
/// </summary>
18051805
/// <param name="info"></param>
18061806
/// <param name="context"></param>
1807-
[Obsolete("Legacy serialization support is deprecated since .NET 8", DiagnosticId = "SYSLIB0051")]
1807+
[Obsolete("Legacy serialization support is deprecated since .NET 8", DiagnosticId = "SYSLIB0051")]
18081808
protected TypeTableLoadException(SerializationInfo info, StreamingContext context)
18091809
{
18101810
throw new NotSupportedException();
@@ -4098,7 +4098,7 @@ internal PSObject.AdapterSet GetTypeAdapter(Type type)
40984098
#endif
40994099
}
41004100

4101-
private TypeMemberData GetTypeMemberDataFromPSMemberInfo(PSMemberInfo member)
4101+
private static TypeMemberData GetTypeMemberDataFromPSMemberInfo(PSMemberInfo member)
41024102
{
41034103
var note = member as PSNoteProperty;
41044104
if (note != null)
@@ -4165,7 +4165,7 @@ private TypeMemberData GetTypeMemberDataFromPSMemberInfo(PSMemberInfo member)
41654165
/// </summary>
41664166
/// <param name="member"></param>
41674167
/// <param name="typeData"></param>
4168-
private void LoadMembersToTypeData(PSMemberInfo member, TypeData typeData)
4168+
private static void LoadMembersToTypeData(PSMemberInfo member, TypeData typeData)
41694169
{
41704170
Dbg.Assert(member != null, "caller should guarantee that member is not null");
41714171
Dbg.Assert(typeData != null, "caller should guarantee that typeData is not null");
@@ -4201,7 +4201,7 @@ private static T GetParameterType<T>(object sourceValue)
42014201
/// <summary>
42024202
/// Load the standard members into the passed-in TypeData.
42034203
/// </summary>
4204-
private void LoadStandardMembersToTypeData(PSMemberSet memberSet, TypeData typeData)
4204+
private static void LoadStandardMembersToTypeData(PSMemberSet memberSet, TypeData typeData)
42054205
{
42064206
foreach (PSMemberInfo member in memberSet.InternalMembers)
42074207
{

src/System.Management.Automation/engine/interpreter/LightCompiler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1357,7 +1357,7 @@ private void CompileThrowUnaryExpression(Expression expr, bool asVoid)
13571357
}
13581358

13591359
// TODO: remove (replace by true fault support)
1360-
private bool EndsWithRethrow(Expression expr)
1360+
private static bool EndsWithRethrow(Expression expr)
13611361
{
13621362
if (expr.NodeType == ExpressionType.Throw)
13631363
{

0 commit comments

Comments
 (0)