diff --git a/src/dotnet-svcutil/lib/src/CodeDomFixup/CodeDomVisitors/AddAsyncOpenClose.cs b/src/dotnet-svcutil/lib/src/CodeDomFixup/CodeDomVisitors/AddAsyncOpenClose.cs index 2e84e4bbee48..e691c718238a 100644 --- a/src/dotnet-svcutil/lib/src/CodeDomFixup/CodeDomVisitors/AddAsyncOpenClose.cs +++ b/src/dotnet-svcutil/lib/src/CodeDomFixup/CodeDomVisitors/AddAsyncOpenClose.cs @@ -7,7 +7,7 @@ using System.ServiceModel; using System.Threading.Tasks; using System.Linq; -using System.Xml.Linq; +using static Microsoft.Tools.ServiceModel.Svcutil.TargetFrameworkHelper; namespace Microsoft.Tools.ServiceModel.Svcutil { @@ -32,7 +32,18 @@ public AddAsyncOpenClose(CommandProcessorOptions options) { if (options.TargetFramework.IsDnx) { - if (TargetFrameworkHelper.NetCoreVersionReferenceTable.TryGetValue(options.TargetFramework.Version, out var referenceTable)) + bool findVersion = false; + System.Collections.Generic.List referenceTable = null; + if(options.TargetFramework.Name != FrameworkInfo.Netstandard) + { + findVersion = NetCoreVersionReferenceTable.TryGetValue(options.TargetFramework.Version, out referenceTable); + } + else if (NetStandardToNetCoreVersionMap.Keys.Contains(options.TargetFramework.Version)) + { + findVersion = NetCoreVersionReferenceTable.TryGetValue(NetCoreToWCFPackageReferenceVersionMap[NetStandardToNetCoreVersionMap[options.TargetFramework.Version]], out referenceTable); + } + + if (findVersion) { string version = referenceTable.FirstOrDefault().Version; string[] vers = version.Split('.'); diff --git a/src/dotnet-svcutil/lib/src/Shared/FrameworkInfo.cs b/src/dotnet-svcutil/lib/src/Shared/FrameworkInfo.cs index cbba8c2ffe4b..4eb8a0a62842 100644 --- a/src/dotnet-svcutil/lib/src/Shared/FrameworkInfo.cs +++ b/src/dotnet-svcutil/lib/src/Shared/FrameworkInfo.cs @@ -14,6 +14,7 @@ internal class FrameworkInfo public const string Netstandard = "netstandard"; public const string Netcoreapp = "netcoreapp"; public const string Netfx = "net"; + public const string Netframework = "netframework"; public const string Netversion = "version"; private FrameworkInfo() @@ -40,6 +41,7 @@ public static FrameworkInfo Parse(string fullFrameworkName) // framework spec form: 'net5.0' // framework spec form: '.NETCoreApp,Version=v6.0' // framework spec form: '.NETFramework,Version=v4.8' + // framework spec form: '.NETStandard,Version=v2.0' // framework spec form: 'net7.0-windows10.0.19041.0', 'net7.0-windows' for (int i = 0; i < fullFrameworkName.Length; i++) { @@ -76,15 +78,22 @@ public static FrameworkInfo Parse(string fullFrameworkName) if (name.ToLower().Contains(Netversion)) { - //netcoreapp3.1 and lower - if (version.Major < 4) + //.NETStandard,Version=v2.0 => netstandard2.0 + if (name.ToLower().Contains(Netstandard)) { - name = Netcoreapp; + name = Netstandard; } - else + //.NETFramework,Version=v4.8 => net4.8 + //.NETCoreApp,Version=v6.0 => net6.0 + else if (name.ToLower().Contains(Netframework) || version.Major >= 5) { name = Netfx; } + //.NETCoreApp,Version=v3.1 => netcoreapp3.1 + else + { + name = Netcoreapp; + } fullFrameworkName = string.Concat(name, version.ToString()); } @@ -101,8 +110,8 @@ public static FrameworkInfo Parse(string fullFrameworkName) fxInfo.Version = version; fxInfo.IsDnx = name == Netstandard || name == Netcoreapp || version.Major >= 5; fxInfo.IsKnownDnx = fxInfo.IsDnx && - (TargetFrameworkHelper.NetStandardToNetCoreVersionMap.Keys.Any((netstdVersion) => netstdVersion == version) || - TargetFrameworkHelper.NetStandardToNetCoreVersionMap.Values.Any((netcoreVersion) => netcoreVersion == version)); + ((name == Netstandard && TargetFrameworkHelper.NetStandardToNetCoreVersionMap.Keys.Any((netstdVersion) => netstdVersion == version)) || + (name != Netstandard && TargetFrameworkHelper.NetCoreToWCFPackageReferenceVersionMap.Keys.Any((netcoreVersion) => netcoreVersion == version))); return fxInfo; } diff --git a/src/dotnet-svcutil/lib/src/Shared/TargetFrameworkHelper.cs b/src/dotnet-svcutil/lib/src/Shared/TargetFrameworkHelper.cs index 92e796bd428a..7a647b19d914 100644 --- a/src/dotnet-svcutil/lib/src/Shared/TargetFrameworkHelper.cs +++ b/src/dotnet-svcutil/lib/src/Shared/TargetFrameworkHelper.cs @@ -21,7 +21,24 @@ internal class TargetFrameworkHelper {new Version("1.5"), new Version("1.0") }, {new Version("1.6"), new Version("1.0") }, {new Version("1.6.1"), new Version("1.1") }, - {new Version("2.0"), new Version("2.0") } + {new Version("2.0"), new Version("5.1") }, + {new Version("2.1"), new Version("5.1") } + }); + + public static ReadOnlyDictionary NetCoreToWCFPackageReferenceVersionMap { get; } = new ReadOnlyDictionary(new SortedDictionary + { + {new Version("1.0"), new Version("1.0") }, + {new Version("1.1"), new Version("1.1") }, + {new Version("2.0"), new Version("2.0") }, + {new Version("2.1"), new Version("2.1") }, + {new Version("2.2"), new Version("2.1") }, + {new Version("3.0"), new Version("2.1") }, + {new Version("3.1"), new Version("3.1") }, + {new Version("5.0"), new Version("5.0") }, + {new Version("5.1"), new Version("5.1") }, + {new Version("6.0"), new Version("6.0") }, + {new Version("7.0"), new Version("6.0") }, + {new Version("8.0"), new Version("8.0") } }); internal static SortedDictionary> NetCoreVersionReferenceTable = new SortedDictionary> @@ -65,16 +82,14 @@ internal class TargetFrameworkHelper ProjectDependency.FromPackage("System.ServiceModel.Security", "4.8.*"), ProjectDependency.FromPackage("System.ServiceModel.Federation", "4.8.*") } }, - {new Version("6.0"), new List { - ProjectDependency.FromPackage("System.ServiceModel.Http", "6.2.*"), - ProjectDependency.FromPackage("System.ServiceModel.NetTcp", "6.2.*"), - ProjectDependency.FromPackage("System.ServiceModel.NetNamedPipe", "6.2.*"), - ProjectDependency.FromPackage("System.ServiceModel.Primitives", "6.2.*"), - ProjectDependency.FromPackage("System.ServiceModel.Federation", "6.2.*"), - ProjectDependency.FromPackage("System.ServiceModel.UnixDomainSocket", "6.2.*"), - ProjectDependency.FromPackage("System.Web.Services.Description", "6.2.*") + {new Version("5.1"), new List { + ProjectDependency.FromPackage("System.ServiceModel.Duplex", "4.10.*" ), + ProjectDependency.FromPackage("System.ServiceModel.Http", "4.10.*" ), + ProjectDependency.FromPackage("System.ServiceModel.NetTcp", "4.10.*" ), + ProjectDependency.FromPackage("System.ServiceModel.Security", "4.10.*"), + ProjectDependency.FromPackage("System.ServiceModel.Federation", "4.10.*") } }, - {new Version("7.0"), new List { + {new Version("6.0"), new List { ProjectDependency.FromPackage("System.ServiceModel.Http", "6.2.*"), ProjectDependency.FromPackage("System.ServiceModel.NetTcp", "6.2.*"), ProjectDependency.FromPackage("System.ServiceModel.NetNamedPipe", "6.2.*"), @@ -116,7 +131,7 @@ internal class TargetFrameworkHelper public static Version MinSupportedNetFxVersion { get; } = new Version("4.5"); public static Version MinSupportedNetStandardVersion { get; } = NetStandardToNetCoreVersionMap.Keys.First(); - public static Version MinSupportedNetCoreAppVersion { get; } = NetStandardToNetCoreVersionMap.Values.First(); + public static Version MinSupportedNetCoreAppVersion { get; } = NetCoreToWCFPackageReferenceVersionMap.Keys.First(); public static IEnumerable GetWcfProjectReferences(string targetFramework) { @@ -126,9 +141,13 @@ public static IEnumerable GetWcfProjectReferences(string targ { if (frameworkInfo.IsDnx) { - if (NetCoreVersionReferenceTable.ContainsKey(frameworkInfo.Version)) + if(frameworkInfo.Name == FrameworkInfo.Netstandard && TargetFrameworkHelper.NetStandardToNetCoreVersionMap.Keys.Contains(frameworkInfo.Version)) + { + dependencies = NetCoreVersionReferenceTable[NetCoreToWCFPackageReferenceVersionMap[NetStandardToNetCoreVersionMap[frameworkInfo.Version]]]; + } + else if(frameworkInfo.Name != FrameworkInfo.Netstandard && NetCoreToWCFPackageReferenceVersionMap.ContainsKey(frameworkInfo.Version)) { - dependencies = NetCoreVersionReferenceTable[frameworkInfo.Version]; + dependencies = NetCoreVersionReferenceTable[NetCoreToWCFPackageReferenceVersionMap[frameworkInfo.Version]]; } else { @@ -190,16 +209,8 @@ public static Version GetLowestNetCoreVersion(IEnumerable targetFramewor } else { - // target framework is not the minumum standard supported netcore version but it is a known shipped netcore version. - if (TargetFrameworkHelper.NetCoreVersionReferenceTable.ContainsKey(frameworkInfo.Version)) - { - netCoreVersion = frameworkInfo.Version; - } - else - { - // target framework is not known to the tool, use the latest known netcore version. - netCoreVersion = TargetFrameworkHelper.NetCoreVersionReferenceTable.Keys.LastOrDefault(); - } + // target framework is not known to the tool, use the latest known netcore version. + netCoreVersion = TargetFrameworkHelper.NetCoreVersionReferenceTable.Keys.LastOrDefault(); } if (targetVersion == null || targetVersion > netCoreVersion) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/MultiTargetCloseAsyncGeneration/net50/ServiceReference/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/MultiTargetCloseAsyncGeneration/net50/ServiceReference/Reference.cs new file mode 100644 index 000000000000..72fa5405bfeb --- /dev/null +++ b/src/dotnet-svcutil/lib/tests/Baselines/MultiTargetCloseAsyncGeneration/net50/ServiceReference/Reference.cs @@ -0,0 +1,195 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace ServiceReference +{ + using System.Runtime.Serialization; + + + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "99.99.99")] + [System.Runtime.Serialization.DataContractAttribute(Name="BinLibrary", Namespace="http://schemas.datacontract.org/2004/07/BinLib")] + public partial class BinLibrary : object + { + + private string ValueField; + + [System.Runtime.Serialization.DataMemberAttribute()] + public string Value + { + get + { + return this.ValueField; + } + set + { + this.ValueField = value; + } + } + } + + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "99.99.99")] + [System.Runtime.Serialization.DataContractAttribute(Name="TypeReuseCompositeType", Namespace="http://schemas.datacontract.org/2004/07/TypesLib")] + public partial class TypeReuseCompositeType : object + { + + private bool BoolValueField; + + private string StringValueField; + + [System.Runtime.Serialization.DataMemberAttribute()] + public bool BoolValue + { + get + { + return this.BoolValueField; + } + set + { + this.BoolValueField = value; + } + } + + [System.Runtime.Serialization.DataMemberAttribute()] + public string StringValue + { + get + { + return this.StringValueField; + } + set + { + this.StringValueField = value; + } + } + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "99.99.99")] + [System.ServiceModel.ServiceContractAttribute(ConfigurationName="ServiceReference.ITypeReuseSvc")] + public interface ITypeReuseSvc + { + + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/ITypeReuseSvc/GetData", ReplyAction="http://tempuri.org/ITypeReuseSvc/GetDataResponse")] + System.Threading.Tasks.Task GetDataAsync(int value); + + [System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/ITypeReuseSvc/GetDataUsingDataContract", ReplyAction="http://tempuri.org/ITypeReuseSvc/GetDataUsingDataContractResponse")] + System.Threading.Tasks.Task GetDataUsingDataContractAsync(ServiceReference.TypeReuseCompositeType composite); + } + + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "99.99.99")] + public interface ITypeReuseSvcChannel : ServiceReference.ITypeReuseSvc, System.ServiceModel.IClientChannel + { + } + + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "99.99.99")] + public partial class TypeReuseSvcClient : System.ServiceModel.ClientBase, ServiceReference.ITypeReuseSvc + { + + /// + /// Implement this partial method to configure the service endpoint. + /// + /// The endpoint to configure + /// The client credentials + static partial void ConfigureEndpoint(System.ServiceModel.Description.ServiceEndpoint serviceEndpoint, System.ServiceModel.Description.ClientCredentials clientCredentials); + + public TypeReuseSvcClient() : + base(TypeReuseSvcClient.GetDefaultBinding(), TypeReuseSvcClient.GetDefaultEndpointAddress()) + { + this.Endpoint.Name = EndpointConfiguration.BasicHttpBinding_ITypeReuseSvc.ToString(); + ConfigureEndpoint(this.Endpoint, this.ClientCredentials); + } + + public TypeReuseSvcClient(EndpointConfiguration endpointConfiguration) : + base(TypeReuseSvcClient.GetBindingForEndpoint(endpointConfiguration), TypeReuseSvcClient.GetEndpointAddress(endpointConfiguration)) + { + this.Endpoint.Name = endpointConfiguration.ToString(); + ConfigureEndpoint(this.Endpoint, this.ClientCredentials); + } + + public TypeReuseSvcClient(EndpointConfiguration endpointConfiguration, string remoteAddress) : + base(TypeReuseSvcClient.GetBindingForEndpoint(endpointConfiguration), new System.ServiceModel.EndpointAddress(remoteAddress)) + { + this.Endpoint.Name = endpointConfiguration.ToString(); + ConfigureEndpoint(this.Endpoint, this.ClientCredentials); + } + + public TypeReuseSvcClient(EndpointConfiguration endpointConfiguration, System.ServiceModel.EndpointAddress remoteAddress) : + base(TypeReuseSvcClient.GetBindingForEndpoint(endpointConfiguration), remoteAddress) + { + this.Endpoint.Name = endpointConfiguration.ToString(); + ConfigureEndpoint(this.Endpoint, this.ClientCredentials); + } + + public TypeReuseSvcClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : + base(binding, remoteAddress) + { + } + + public System.Threading.Tasks.Task GetDataAsync(int value) + { + return base.Channel.GetDataAsync(value); + } + + public System.Threading.Tasks.Task GetDataUsingDataContractAsync(ServiceReference.TypeReuseCompositeType composite) + { + return base.Channel.GetDataUsingDataContractAsync(composite); + } + + public virtual System.Threading.Tasks.Task OpenAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); + } + + public virtual System.Threading.Tasks.Task CloseAsync() + { + return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); + } + + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) + { + if ((endpointConfiguration == EndpointConfiguration.BasicHttpBinding_ITypeReuseSvc)) + { + System.ServiceModel.BasicHttpBinding result = new System.ServiceModel.BasicHttpBinding(); + result.MaxBufferSize = int.MaxValue; + result.ReaderQuotas = System.Xml.XmlDictionaryReaderQuotas.Max; + result.MaxReceivedMessageSize = int.MaxValue; + result.AllowCookies = true; + return result; + } + throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration)); + } + + private static System.ServiceModel.EndpointAddress GetEndpointAddress(EndpointConfiguration endpointConfiguration) + { + if ((endpointConfiguration == EndpointConfiguration.BasicHttpBinding_ITypeReuseSvc)) + { + return new System.ServiceModel.EndpointAddress("http://localhost:51074/TypeReuseSvc.svc"); + } + throw new System.InvalidOperationException(string.Format("Could not find endpoint with name \'{0}\'.", endpointConfiguration)); + } + + private static System.ServiceModel.Channels.Binding GetDefaultBinding() + { + return TypeReuseSvcClient.GetBindingForEndpoint(EndpointConfiguration.BasicHttpBinding_ITypeReuseSvc); + } + + private static System.ServiceModel.EndpointAddress GetDefaultEndpointAddress() + { + return TypeReuseSvcClient.GetEndpointAddress(EndpointConfiguration.BasicHttpBinding_ITypeReuseSvc); + } + + public enum EndpointConfiguration + { + + BasicHttpBinding_ITypeReuseSvc, + } + } +} \ No newline at end of file diff --git a/src/dotnet-svcutil/lib/tests/Baselines/MultiTargetCloseAsyncGeneration/net50/ServiceReference/dotnet-svcutil.params.json b/src/dotnet-svcutil/lib/tests/Baselines/MultiTargetCloseAsyncGeneration/net50/ServiceReference/dotnet-svcutil.params.json new file mode 100644 index 000000000000..6b532012d5e0 --- /dev/null +++ b/src/dotnet-svcutil/lib/tests/Baselines/MultiTargetCloseAsyncGeneration/net50/ServiceReference/dotnet-svcutil.params.json @@ -0,0 +1,15 @@ +{ + "providerId": "Microsoft.Tools.ServiceModel.Svcutil", + "version": "99.99.99", + "options": { + "inputs": [ + "$testCasesPath$/wsdl/Simple.wsdl" + ], + "namespaceMappings": [ + "*, ServiceReference" + ], + "outputFile": "Reference.cs", + "targetFramework": "N.N", + "typeReuseMode": "All" + } +} \ No newline at end of file diff --git a/src/dotnet-svcutil/lib/tests/Baselines/MultiTargetCloseAsyncGeneration/net50/net50.csproj b/src/dotnet-svcutil/lib/tests/Baselines/MultiTargetCloseAsyncGeneration/net50/net50.csproj new file mode 100644 index 000000000000..5a8cf333d186 --- /dev/null +++ b/src/dotnet-svcutil/lib/tests/Baselines/MultiTargetCloseAsyncGeneration/net50/net50.csproj @@ -0,0 +1,14 @@ + + + + Exe + N.N + + + + + + + + + \ No newline at end of file diff --git a/src/dotnet-svcutil/lib/tests/Baselines/MultiTargetCloseAsyncGeneration/netstd20/ServiceReference/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/MultiTargetCloseAsyncGeneration/netstd20/ServiceReference/Reference.cs index 72fa5405bfeb..cfe70ab35c87 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/MultiTargetCloseAsyncGeneration/netstd20/ServiceReference/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/MultiTargetCloseAsyncGeneration/netstd20/ServiceReference/Reference.cs @@ -148,11 +148,6 @@ public virtual System.Threading.Tasks.Task OpenAsync() return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginOpen(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndOpen)); } - public virtual System.Threading.Tasks.Task CloseAsync() - { - return System.Threading.Tasks.Task.Factory.FromAsync(((System.ServiceModel.ICommunicationObject)(this)).BeginClose(null, null), new System.Action(((System.ServiceModel.ICommunicationObject)(this)).EndClose)); - } - private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.BasicHttpBinding_ITypeReuseSvc)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/MultiTargetCloseAsyncGeneration/netstd20/netstd20.csproj b/src/dotnet-svcutil/lib/tests/Baselines/MultiTargetCloseAsyncGeneration/netstd20/netstd20.csproj index e09e63205b0d..c542073cd70c 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/MultiTargetCloseAsyncGeneration/netstd20/netstd20.csproj +++ b/src/dotnet-svcutil/lib/tests/Baselines/MultiTargetCloseAsyncGeneration/netstd20/netstd20.csproj @@ -8,5 +8,6 @@ + \ No newline at end of file diff --git a/src/dotnet-svcutil/lib/tests/TestCases/MultiTargetCloseAsyncGeneration/net50/Program.cs b/src/dotnet-svcutil/lib/tests/TestCases/MultiTargetCloseAsyncGeneration/net50/Program.cs new file mode 100644 index 000000000000..3718b5bfe3e7 --- /dev/null +++ b/src/dotnet-svcutil/lib/tests/TestCases/MultiTargetCloseAsyncGeneration/net50/Program.cs @@ -0,0 +1,12 @@ +using System; + +namespace net50 +{ + class Program + { + static void Main(string[] args) + { + Console.WriteLine("Hello World!"); + } + } +} diff --git a/src/dotnet-svcutil/lib/tests/TestCases/MultiTargetCloseAsyncGeneration/net50/net50.csproj b/src/dotnet-svcutil/lib/tests/TestCases/MultiTargetCloseAsyncGeneration/net50/net50.csproj new file mode 100644 index 000000000000..2082704286ba --- /dev/null +++ b/src/dotnet-svcutil/lib/tests/TestCases/MultiTargetCloseAsyncGeneration/net50/net50.csproj @@ -0,0 +1,8 @@ + + + + Exe + net5.0 + + + diff --git a/src/dotnet-svcutil/lib/tests/src/GlobalToolTests.cs b/src/dotnet-svcutil/lib/tests/src/GlobalToolTests.cs index 206aac0e6669..f47e8e1e936a 100644 --- a/src/dotnet-svcutil/lib/tests/src/GlobalToolTests.cs +++ b/src/dotnet-svcutil/lib/tests/src/GlobalToolTests.cs @@ -109,7 +109,8 @@ public void FullFramework(string testCaseName) [Trait("Category", "BVT")] [Theory] [InlineData("net48")] //System.ServiceModel get referened and CloseAsync() is generated - [InlineData("netstd20")] //WCF package older than V4.10 get referened and CloseAsync() is generated + [InlineData("net50")] //WCF package older than V4.10 get referened and CloseAsync() is generated + [InlineData("netstd20")] //WCF package of V4.10.* get referened and CloseAsync() is not generated [InlineData("net60")] //WCF package newer than V4.10 get referened and CloseAsync() is not generated [InlineData("net60net48")] //WCF package newer than V4.10 and System.ServiceModel.dll are referenced conditionally by target and CloseAsync() be generarted with conditional compilation mark public async Task MultiTargetCloseAsyncGeneration(string testCaseName)