Move build to .NET 8 preview 6 (#19991)

This commit is contained in:
Steve Lee 2023-08-07 14:30:33 -07:00 committed by GitHub
parent 6a950e5bd7
commit e97105bf7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 30 additions and 52 deletions

View File

@ -80,11 +80,6 @@ stages:
parameters:
channel: preview
architecture: x86
- template: templates/windows-packaging.yml
parameters:
channel: preview
architecture: arm
runtimePrefix: win
- template: templates/windows-packaging.yml
parameters:
channel: preview

View File

@ -1,5 +1,5 @@
{
"sdk": {
"version": "8.0.100-preview.4.23260.5"
"version": "8.0.100-preview.6.23330.14"
}
}

View File

@ -734,7 +734,7 @@ namespace Microsoft.PowerShell.Commands
/// <summary>
/// Disposes the associated WebSession if it is not being used as part of a persistent session.
/// </summary>
/// </summary>
/// <param name="disposing">True when called from Dispose() and false when called from finalizer.</param>
protected virtual void Dispose(bool disposing)
{
@ -752,7 +752,7 @@ namespace Microsoft.PowerShell.Commands
/// <summary>
/// Disposes the associated WebSession if it is not being used as part of a persistent session.
/// </summary>
/// </summary>
public void Dispose()
{
Dispose(disposing: true);
@ -1716,7 +1716,7 @@ namespace Microsoft.PowerShell.Commands
/// <param name="fieldValue">The Field Value to use.</param>
/// <param name="formData">The <see cref="MultipartFormDataContent"/> to update.</param>
/// <param name="enumerate">If true, collection types in <paramref name="fieldValue"/> will be enumerated. If false, collections will be treated as single value.</param>
private void AddMultipartContent(object fieldName, object fieldValue, MultipartFormDataContent formData, bool enumerate)
private static void AddMultipartContent(object fieldName, object fieldValue, MultipartFormDataContent formData, bool enumerate)
{
ArgumentNullException.ThrowIfNull(formData);

View File

@ -458,9 +458,7 @@ namespace Microsoft.PowerShell
/// <returns>
/// The found node, or null if no suitable node was located.
/// </returns>
private
ProgressNode
FindOldestNodeOfGivenStyle(ArrayList nodes, int oldestSoFar, ProgressNode.RenderStyle style)
private static ProgressNode FindOldestNodeOfGivenStyle(ArrayList nodes, int oldestSoFar, ProgressNode.RenderStyle style)
{
if (nodes == null)
{
@ -631,9 +629,7 @@ namespace Microsoft.PowerShell
/// <param name="rawUI">
/// The PSHostRawUserInterface used to gauge string widths in the rendering.
/// </param>
private
void
RenderHelper(ArrayList strings, ArrayList nodes, int indentation, int maxWidth, PSHostRawUserInterface rawUI)
private static void RenderHelper(ArrayList strings, ArrayList nodes, int indentation, int maxWidth, PSHostRawUserInterface rawUI)
{
Dbg.Assert(strings != null, "strings should not be null");
Dbg.Assert(nodes != null, "nodes should not be null");
@ -721,9 +717,7 @@ namespace Microsoft.PowerShell
/// <param name="nodes"></param>
/// <param name="style"></param>
/// <returns></returns>
private
bool
AllNodesHaveGivenStyle(ArrayList nodes, ProgressNode.RenderStyle style)
private static bool AllNodesHaveGivenStyle(ArrayList nodes, ProgressNode.RenderStyle style)
{
if (nodes == null)
{

View File

@ -352,7 +352,7 @@ namespace System.Management.Automation.ComInterop
// We will try VT_DISPATCH and then call GetNativeVariantForObject.
private const VarEnum VT_DEFAULT = VarEnum.VT_RECORD;
private VarEnum GetComType(ref Type argumentType)
private static VarEnum GetComType(ref Type argumentType)
{
if (argumentType == typeof(Missing))
{
@ -431,7 +431,7 @@ namespace System.Management.Automation.ComInterop
/// <summary>
/// Get the COM Variant type that argument should be marshalled as for a call to COM.
/// </summary>
private VariantBuilder GetVariantBuilder(Type argumentType)
private static VariantBuilder GetVariantBuilder(Type argumentType)
{
//argumentType is coming from MarshalType, null means the dynamic object holds
//a null value and not byref

View File

@ -41,7 +41,8 @@ internal static partial class Interop
internal sealed class SafeFindHandle : SafeHandleZeroOrMinusOneIsInvalid
{
private SafeFindHandle() : base(true) { }
// .NET 8 requires the default constructor to be public
public SafeFindHandle() : base(true) { }
protected override bool ReleaseHandle()
{

View File

@ -291,7 +291,7 @@ namespace Microsoft.PowerShell.Commands
return false;
}
private void GetAllNestedModules(PSModuleInfo module, ref List<PSModuleInfo> nestedModulesWithNoCircularReference)
private static void GetAllNestedModules(PSModuleInfo module, ref List<PSModuleInfo> nestedModulesWithNoCircularReference)
{
List<PSModuleInfo> nestedModules = new List<PSModuleInfo>();
if (module.NestedModules != null && module.NestedModules.Count > 0)

View File

@ -431,7 +431,7 @@ namespace System.Management.Automation
return AstVisitAction.SkipChildren;
}
private void ProcessCmdletArguments(object value, Action<string> onEachArgument)
private static void ProcessCmdletArguments(object value, Action<string> onEachArgument)
{
if (value == null)
{

View File

@ -1804,7 +1804,7 @@ namespace System.Management.Automation.Runspaces
/// </summary>
/// <param name="info"></param>
/// <param name="context"></param>
[Obsolete("Legacy serialization support is deprecated since .NET 8", DiagnosticId = "SYSLIB0051")]
[Obsolete("Legacy serialization support is deprecated since .NET 8", DiagnosticId = "SYSLIB0051")]
protected TypeTableLoadException(SerializationInfo info, StreamingContext context)
{
throw new NotSupportedException();
@ -4098,7 +4098,7 @@ namespace System.Management.Automation.Runspaces
#endif
}
private TypeMemberData GetTypeMemberDataFromPSMemberInfo(PSMemberInfo member)
private static TypeMemberData GetTypeMemberDataFromPSMemberInfo(PSMemberInfo member)
{
var note = member as PSNoteProperty;
if (note != null)
@ -4165,7 +4165,7 @@ namespace System.Management.Automation.Runspaces
/// </summary>
/// <param name="member"></param>
/// <param name="typeData"></param>
private void LoadMembersToTypeData(PSMemberInfo member, TypeData typeData)
private static void LoadMembersToTypeData(PSMemberInfo member, TypeData typeData)
{
Dbg.Assert(member != null, "caller should guarantee that member is not null");
Dbg.Assert(typeData != null, "caller should guarantee that typeData is not null");
@ -4201,7 +4201,7 @@ namespace System.Management.Automation.Runspaces
/// <summary>
/// Load the standard members into the passed-in TypeData.
/// </summary>
private void LoadStandardMembersToTypeData(PSMemberSet memberSet, TypeData typeData)
private static void LoadStandardMembersToTypeData(PSMemberSet memberSet, TypeData typeData)
{
foreach (PSMemberInfo member in memberSet.InternalMembers)
{

View File

@ -1357,7 +1357,7 @@ namespace System.Management.Automation.Interpreter
}
// TODO: remove (replace by true fault support)
private bool EndsWithRethrow(Expression expr)
private static bool EndsWithRethrow(Expression expr)
{
if (expr.NodeType == ExpressionType.Throw)
{

View File

@ -553,7 +553,7 @@ namespace System.Management.Automation.Language
break;
}
if (block2.IsCatchAll)
if (block2.IsCatchAll)
{
continue;
}
@ -1033,7 +1033,7 @@ namespace System.Management.Automation.Language
return AstVisitAction.Continue;
}
private ExpressionAst CheckUsingExpression(ExpressionAst exprAst)
private static ExpressionAst CheckUsingExpression(ExpressionAst exprAst)
{
RuntimeHelpers.EnsureSufficientExecutionStack();
if (exprAst is VariableExpressionAst)

View File

@ -6007,7 +6007,7 @@ namespace System.Management.Automation
typeof(PSPrimitiveDictionary)
};
private void VerifyValue(object value)
private static void VerifyValue(object value)
{
// null is a primitive type
if (value == null)
@ -6065,7 +6065,7 @@ namespace System.Management.Automation
public override void Add(object key, object value)
{
string keyAsString = VerifyKey(key);
this.VerifyValue(value);
VerifyValue(value);
base.Add(keyAsString, value);
}
@ -6093,7 +6093,7 @@ namespace System.Management.Automation
set
{
string keyAsString = VerifyKey(key);
this.VerifyValue(value);
VerifyValue(value);
base[keyAsString] = value;
}
}
@ -6121,7 +6121,7 @@ namespace System.Management.Automation
set
{
this.VerifyValue(value);
VerifyValue(value);
base[key] = value;
}
}

View File

@ -315,7 +315,7 @@ namespace System.Management.Automation
/// Name of the property for which text needs to be extracted.
/// </param>
/// <returns></returns>
private string ExtractTextForHelpProperty(PSObject psObject, string propertyName)
private static string ExtractTextForHelpProperty(PSObject psObject, string propertyName)
{
if (psObject == null)
return string.Empty;
@ -336,7 +336,7 @@ namespace System.Management.Automation
/// </summary>
/// <param name="psObject"></param>
/// <returns></returns>
private string ExtractText(PSObject psObject)
private static string ExtractText(PSObject psObject)
{
if (psObject == null)
{

View File

@ -321,7 +321,7 @@ namespace System.Management.Automation
/// <param name="xmlNode">
/// Node whose children are verified for maml.
/// </param>
private void RemoveUnsupportedNodes(XmlNode xmlNode)
private static void RemoveUnsupportedNodes(XmlNode xmlNode)
{
// Start with the first child..
// We want to modify only children..

View File

@ -797,7 +797,7 @@ namespace Microsoft.PowerShell.Commands
/// </summary>
/// <param name="path">Path to resolve.</param>
/// <returns>A list of directories.</returns>
private IEnumerable<string> RecursiveResolvePathHelper(string path)
private static IEnumerable<string> RecursiveResolvePathHelper(string path)
{
if (System.IO.Directory.Exists(path))
{

View File

@ -8,7 +8,7 @@
<ItemGroup>
<PackageReference Include="CommandLineParser" Version="2.9.1" />
<PackageReference Include="MarkdownLog.NS20" Version="0.10.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="BenchmarkDotNet" Version="0.13.5" />
<PackageReference Include="Perfolizer" Version="0.3.4" />
</ItemGroup>

View File

@ -9,6 +9,7 @@
<!-- Disable deps.json generation -->
<GenerateDependencyFile>false</GenerateDependencyFile>
<NoWarn>NU1902</NoWarn>
<!-- Deploy the produced assembly -->
<PublishDir>..\..\Modules\IsolatedModule\Dependencies</PublishDir>

View File

@ -108,10 +108,6 @@ stages:
parameters:
Architecture: x86
- template: templates/windows-hosted-build.yml
parameters:
Architecture: arm
- template: templates/windows-hosted-build.yml
parameters:
Architecture: arm64
@ -304,11 +300,6 @@ stages:
Architecture: x86
parentJob: build_windows_x86_release
- template: templates/windows-packaging.yml
parameters:
Architecture: arm
parentJob: build_windows_arm_release
- template: templates/windows-packaging.yml
parameters:
Architecture: arm64

View File

@ -61,10 +61,6 @@ stages:
parameters:
architecture: x86
- template: ./templates/vpackReleaseJob.yml
parameters:
architecture: arm32
- template: ./templates/vpackReleaseJob.yml
parameters:
architecture: arm64