From b28a1719e7239bc1cd2dae3674c42a3dcd1d06c8 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Wed, 17 Jan 2018 22:39:49 +0100 Subject: [PATCH] Close #1033: Add TFM for net45 --- ICSharpCode.Decompiler/CSharp/CallBuilder.cs | 6 +++--- ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj | 4 ++-- .../ICSharpCode.Decompiler.nuspec.template | 3 +++ 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/ICSharpCode.Decompiler/CSharp/CallBuilder.cs b/ICSharpCode.Decompiler/CSharp/CallBuilder.cs index 619ab3355f..88417af5fa 100644 --- a/ICSharpCode.Decompiler/CSharp/CallBuilder.cs +++ b/ICSharpCode.Decompiler/CSharp/CallBuilder.cs @@ -117,7 +117,7 @@ public ExpressionWithResolveResult Build(OpCode callOpCode, IMethod method, IRea expandedArguments.Add(expressionBuilder.GetDefaultValueExpression(elementType).WithoutILInstruction()); } } - if (IsUnambiguousCall(expectedTargetDetails, method, target, Array.Empty(), expandedArguments) == OverloadResolutionErrors.None) { + if (IsUnambiguousCall(expectedTargetDetails, method, target, Empty.Array, expandedArguments) == OverloadResolutionErrors.None) { isExpandedForm = true; expectedParameters = expandedParameters; arguments = expandedArguments.SelectList(a => new TranslatedExpression(a.Expression.Detach())); @@ -170,7 +170,7 @@ public ExpressionWithResolveResult Build(OpCode callOpCode, IMethod method, IRea .WithRR(rr); } else { - if (IsUnambiguousCall(expectedTargetDetails, method, target, Array.Empty(), arguments) != OverloadResolutionErrors.None) { + if (IsUnambiguousCall(expectedTargetDetails, method, target, Empty.Array, arguments) != OverloadResolutionErrors.None) { for (int i = 0; i < arguments.Count; i++) { if (settings.AnonymousTypes && expectedParameters[i].Type.ContainsAnonymousType()) { if (arguments[i].Expression is LambdaExpression lambda) { @@ -199,7 +199,7 @@ public ExpressionWithResolveResult Build(OpCode callOpCode, IMethod method, IRea bool requireTypeArguments = false; bool targetCasted = false; bool argumentsCasted = false; - IType[] typeArguments = Array.Empty(); + IType[] typeArguments = Empty.Array; OverloadResolutionErrors errors; while ((errors = IsUnambiguousCall(expectedTargetDetails, method, target, typeArguments, arguments)) != OverloadResolutionErrors.None) { diff --git a/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj b/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj index 40bfd51dc0..a60307ea0b 100644 --- a/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj +++ b/ICSharpCode.Decompiler/ICSharpCode.Decompiler.csproj @@ -4,12 +4,12 @@ netstandard2.0 - netstandard2.0;net46 + netstandard2.0;net46;net45 IL decompiler engine ic#code ILSpy - Copyright 2011-2017 AlphaSierraPapa for the SharpDevelop Team + Copyright 2011-2018 AlphaSierraPapa for the SharpDevelop Team en-US False False diff --git a/ICSharpCode.Decompiler/ICSharpCode.Decompiler.nuspec.template b/ICSharpCode.Decompiler/ICSharpCode.Decompiler.nuspec.template index ec83848be8..7d5c743bb8 100644 --- a/ICSharpCode.Decompiler/ICSharpCode.Decompiler.nuspec.template +++ b/ICSharpCode.Decompiler/ICSharpCode.Decompiler.nuspec.template @@ -25,6 +25,9 @@ + + +