From 97a2d88d9bf5fdbd8e75f895af006b16830e62dd Mon Sep 17 00:00:00 2001 From: Carol Wang Date: Tue, 21 Mar 2023 16:41:09 +0800 Subject: [PATCH] dotnet-svcutil test: fix ParamsFiles and typereuse cases --- .../ParamsFiles_SDK_TFM/TFnet5_0/TFnet5_0.cs | 12 -- .../{TFnet5_0 => TFnet8_0}/Reference.cs | 21 +- .../TFnet8_0.csproj} | 2 + .../TFnet8_0.params.json} | 10 +- .../dotnet-svcutil.params.json | 2 +- .../{TFnet5_0 => TFnet8_0}/global.json | 0 .../TFnetcoreapp3_1/Reference.cs | 195 ------------------ .../TFnetcoreapp3_1/TFnetcoreapp3_1.cs | 12 -- .../TFnetcoreapp3_1/TFnetcoreapp3_1.csproj | 14 -- .../TFnetcoreapp3_1.params.json | 22 -- .../dotnet-svcutil.params.json | 18 -- .../SvcutilBootstrapper/Program.cs | 8 - .../TypeReuse/TypeReuse60/TypeReuse60.cs | 18 -- .../TypeReuse/TypeReuse60/global.json | 1 - .../TypeReuse/TypeReuse60/nuget.config | 7 - .../ServiceReference/Reference.cs | 13 +- .../dotnet-svcutil.params.json | 6 +- ...viceModel.Svcutil-bootstrapper.params.json | 14 +- .../SvcutilBootstrapper.csproj | 6 +- .../TypeReuse80.csproj} | 2 + .../TypeReuse80}/global.json | 0 src/dotnet-svcutil/lib/tests/src/E2ETests.cs | 2 +- .../lib/tests/src/GlobalToolTests.cs | 6 +- 23 files changed, 39 insertions(+), 352 deletions(-) delete mode 100644 src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnet5_0/TFnet5_0.cs rename src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/{TFnet5_0 => TFnet8_0}/Reference.cs (89%) rename src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/{TFnet5_0/TFnet5_0.csproj => TFnet8_0/TFnet8_0.csproj} (89%) rename src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/{TFnet5_0/TFnet5_0.params.json => TFnet8_0/TFnet8_0.params.json} (83%) rename src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/{TFnet5_0 => TFnet8_0}/dotnet-svcutil.params.json (94%) rename src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/{TFnet5_0 => TFnet8_0}/global.json (100%) delete mode 100644 src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnetcoreapp3_1/Reference.cs delete mode 100644 src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnetcoreapp3_1/TFnetcoreapp3_1.cs delete mode 100644 src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnetcoreapp3_1/TFnetcoreapp3_1.csproj delete mode 100644 src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnetcoreapp3_1/TFnetcoreapp3_1.params.json delete mode 100644 src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnetcoreapp3_1/dotnet-svcutil.params.json delete mode 100644 src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse60/SvcutilBootstrapper/Program.cs delete mode 100644 src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse60/TypeReuse60.cs delete mode 100644 src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse60/global.json delete mode 100644 src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse60/nuget.config rename src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/{TypeReuse60 => TypeReuse80}/ServiceReference/Reference.cs (92%) rename src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/{TypeReuse60 => TypeReuse80}/ServiceReference/dotnet-svcutil.params.json (96%) rename src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/{TypeReuse60 => TypeReuse80}/SvcutilBootstrapper/Microsoft.Tools.ServiceModel.Svcutil-bootstrapper.params.json (93%) rename src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/{TypeReuse60 => TypeReuse80}/SvcutilBootstrapper/SvcutilBootstrapper.csproj (95%) rename src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/{TypeReuse60/TypeReuse60.csproj => TypeReuse80/TypeReuse80.csproj} (92%) rename src/dotnet-svcutil/lib/tests/Baselines/{ParamsFiles_SDK_TFM/TFnetcoreapp3_1 => TypeReuse/TypeReuse80}/global.json (100%) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnet5_0/TFnet5_0.cs b/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnet5_0/TFnet5_0.cs deleted file mode 100644 index 5f31844e1b78..000000000000 --- a/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnet5_0/TFnet5_0.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; - -namespace TFnet5_0 -{ - class Program - { - static void Main(string[] args) - { - Console.WriteLine("Hello World!"); - } - } -} \ No newline at end of file diff --git a/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnet5_0/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnet8_0/Reference.cs similarity index 89% rename from src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnet5_0/Reference.cs rename to src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnet8_0/Reference.cs index 405cf1ae720f..9bf5899c6a9a 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnet5_0/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnet8_0/Reference.cs @@ -7,7 +7,7 @@ // //------------------------------------------------------------------------------ -namespace TFnet5_0_NS +namespace TFnet8_0_NS { using System.Runtime.Serialization; @@ -72,25 +72,25 @@ public string StringValue } [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "99.99.99")] - [System.ServiceModel.ServiceContractAttribute(ConfigurationName="TFnet5_0_NS.ITypeReuseSvc")] + [System.ServiceModel.ServiceContractAttribute(ConfigurationName="TFnet8_0_NS.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.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(TFnet5_0_NS.TypeReuseCompositeType composite); + System.Threading.Tasks.Task GetDataUsingDataContractAsync(TFnet8_0_NS.TypeReuseCompositeType composite); } [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "99.99.99")] - public interface ITypeReuseSvcChannel : TFnet5_0_NS.ITypeReuseSvc, System.ServiceModel.IClientChannel + public interface ITypeReuseSvcChannel : TFnet8_0_NS.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, TFnet5_0_NS.ITypeReuseSvc + public partial class TypeReuseSvcClient : System.ServiceModel.ClientBase, TFnet8_0_NS.ITypeReuseSvc { /// @@ -133,12 +133,12 @@ public TypeReuseSvcClient(System.ServiceModel.Channels.Binding binding, System.S { } - public System.Threading.Tasks.Task GetDataAsync(int value) + public System.Threading.Tasks.Task GetDataAsync(int value) { return base.Channel.GetDataAsync(value); } - public System.Threading.Tasks.Task GetDataUsingDataContractAsync(TFnet5_0_NS.TypeReuseCompositeType composite) + public System.Threading.Tasks.Task GetDataUsingDataContractAsync(TFnet8_0_NS.TypeReuseCompositeType composite) { return base.Channel.GetDataUsingDataContractAsync(composite); } @@ -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/ParamsFiles_SDK_TFM/TFnet5_0/TFnet5_0.csproj b/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnet8_0/TFnet8_0.csproj similarity index 89% rename from src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnet5_0/TFnet5_0.csproj rename to src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnet8_0/TFnet8_0.csproj index 9c06387c92cb..b88317b8880f 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnet5_0/TFnet5_0.csproj +++ b/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnet8_0/TFnet8_0.csproj @@ -4,6 +4,8 @@ Exe N.N latest + enable + enable diff --git a/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnet5_0/TFnet5_0.params.json b/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnet8_0/TFnet8_0.params.json similarity index 83% rename from src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnet5_0/TFnet5_0.params.json rename to src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnet8_0/TFnet8_0.params.json index 042a5820af34..0b404517c96e 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnet5_0/TFnet5_0.params.json +++ b/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnet8_0/TFnet8_0.params.json @@ -1,18 +1,18 @@ { - "providerId": "TFnet5_0", + "providerId": "TFnet8_0", "version": "99.99.99", "options": { "inputs": [ "$testCasesPath$/wsdl/Simple.wsdl" ], - "bootstrapPath": "$resultPath$/TestBootstrap/ParamsFiles_SDK_TFM/TFnet5_0", + "bootstrapPath": "$resultPath$/TestBootstrap/ParamsFiles_SDK_TFM/TFnet8_0", "namespaceMappings": [ - "*, TFnet5_0_NS" + "*, TFnet8_0_NS" ], "noLogo": true, "noTelemetry": true, - "outputDir": "$resultPath$/TestResults/ParamsFiles_SDK_TFM/TFnet5_0", - "projectFile": "$resultPath$/TestResults/ParamsFiles_SDK_TFM/TFnet5_0/TFnet5_0.csproj", + "outputDir": "$resultPath$/TestResults/ParamsFiles_SDK_TFM/TFnet8_0", + "projectFile": "$resultPath$/TestResults/ParamsFiles_SDK_TFM/TFnet8_0/TFnet8_0.csproj", "references": [ "Newtonsoft.Json, {Newtonsoft.Json, 99.99.99}" ], diff --git a/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnet5_0/dotnet-svcutil.params.json b/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnet8_0/dotnet-svcutil.params.json similarity index 94% rename from src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnet5_0/dotnet-svcutil.params.json rename to src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnet8_0/dotnet-svcutil.params.json index 4abe1c0d8d85..119b1b87e108 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnet5_0/dotnet-svcutil.params.json +++ b/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnet8_0/dotnet-svcutil.params.json @@ -6,7 +6,7 @@ "../../../../../src/dotnet-svcutil/lib/tests/TestCases/wsdl/Simple.wsdl" ], "namespaceMappings": [ - "*, TFnet5_0_NS" + "*, TFnet8_0_NS" ], "outputFile": "Reference.cs", "references": [ diff --git a/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnet5_0/global.json b/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnet8_0/global.json similarity index 100% rename from src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnet5_0/global.json rename to src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnet8_0/global.json diff --git a/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnetcoreapp3_1/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnetcoreapp3_1/Reference.cs deleted file mode 100644 index 4b6e2d99351e..000000000000 --- a/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnetcoreapp3_1/Reference.cs +++ /dev/null @@ -1,195 +0,0 @@ -//------------------------------------------------------------------------------ -// -// 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 TFnetcoreapp3_1_NS -{ - 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="TFnetcoreapp3_1_NS.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(TFnetcoreapp3_1_NS.TypeReuseCompositeType composite); - } - - [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "99.99.99")] - public interface ITypeReuseSvcChannel : TFnetcoreapp3_1_NS.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, TFnetcoreapp3_1_NS.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(TFnetcoreapp3_1_NS.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/ParamsFiles_SDK_TFM/TFnetcoreapp3_1/TFnetcoreapp3_1.cs b/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnetcoreapp3_1/TFnetcoreapp3_1.cs deleted file mode 100644 index c49aca35a832..000000000000 --- a/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnetcoreapp3_1/TFnetcoreapp3_1.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; - -namespace TFnetcoreapp3_1 -{ - class Program - { - static void Main(string[] args) - { - Console.WriteLine("Hello World!"); - } - } -} \ No newline at end of file diff --git a/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnetcoreapp3_1/TFnetcoreapp3_1.csproj b/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnetcoreapp3_1/TFnetcoreapp3_1.csproj deleted file mode 100644 index 31492323aece..000000000000 --- a/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnetcoreapp3_1/TFnetcoreapp3_1.csproj +++ /dev/null @@ -1,14 +0,0 @@ - - - - Exe - N.N - latest - - - - - - - - \ No newline at end of file diff --git a/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnetcoreapp3_1/TFnetcoreapp3_1.params.json b/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnetcoreapp3_1/TFnetcoreapp3_1.params.json deleted file mode 100644 index 0446395bb15c..000000000000 --- a/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnetcoreapp3_1/TFnetcoreapp3_1.params.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "providerId": "TFnetcoreapp3_1", - "version": "99.99.99", - "options": { - "inputs": [ - "$testCasesPath$/wsdl/Simple.wsdl" - ], - "bootstrapPath": "$resultPath$/TestBootstrap/ParamsFiles_SDK_TFM/TFnetcoreapp3_1", - "namespaceMappings": [ - "*, TFnetcoreapp3_1_NS" - ], - "noLogo": true, - "noTelemetry": true, - "outputDir": "$resultPath$/TestResults/ParamsFiles_SDK_TFM/TFnetcoreapp3_1", - "projectFile": "$resultPath$/TestResults/ParamsFiles_SDK_TFM/TFnetcoreapp3_1/TFnetcoreapp3_1.csproj", - "references": [ - "Newtonsoft.Json, {Newtonsoft.Json, 99.99.99}" - ], - "toolContext": "Global", - "verbosity": "Minimal" - } -} \ No newline at end of file diff --git a/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnetcoreapp3_1/dotnet-svcutil.params.json b/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnetcoreapp3_1/dotnet-svcutil.params.json deleted file mode 100644 index 8d60ea969309..000000000000 --- a/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnetcoreapp3_1/dotnet-svcutil.params.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "providerId": "Microsoft.Tools.ServiceModel.Svcutil", - "version": "99.99.99", - "options": { - "inputs": [ - "../../../../../src/dotnet-svcutil/lib/tests/TestCases/wsdl/Simple.wsdl" - ], - "namespaceMappings": [ - "*, TFnetcoreapp3_1_NS" - ], - "outputFile": "Reference.cs", - "references": [ - "Newtonsoft.Json, {Newtonsoft.Json, 99.99.99}" - ], - "targetFramework": "N.N", - "typeReuseMode": "Specified" - } -} \ No newline at end of file diff --git a/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse60/SvcutilBootstrapper/Program.cs b/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse60/SvcutilBootstrapper/Program.cs deleted file mode 100644 index 188ef615cd17..000000000000 --- a/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse60/SvcutilBootstrapper/Program.cs +++ /dev/null @@ -1,8 +0,0 @@ -using System; -namespace SvcutilBootstrap { - public class Program { - public static int Main(string[] args) { - return Microsoft.Tools.ServiceModel.Svcutil.Tool.Main(args); - } - } -} \ No newline at end of file diff --git a/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse60/TypeReuse60.cs b/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse60/TypeReuse60.cs deleted file mode 100644 index d2d3627bf819..000000000000 --- a/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse60/TypeReuse60.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System; -using Microsoft.Tools.ServiceModel.Svcutil; -using System.Linq; -using System.Text.RegularExpressions; - -namespace TypeReuse60 -{ - class Program - { - static int Main(string[] args) - { - var re = new Regex(@"'[^\""]*'|[^\""^\s]+|""[^\""]*"""); - string optstring = @"../TypeReuseSvc.wsdl -nl -v minimal -d $resultPath$/TestResults/TypeReuse/TypeReuse60/ServiceReference -n ""*,TypeReuse60_NS"" -bd $resultPath$/TestResults/TypeReuse/TypeReuse60"; - string[] opts = re.Matches(optstring).Cast().Select(m => m.Value).ToArray(); - return Tool.Main(opts); - } - } -} \ No newline at end of file diff --git a/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse60/global.json b/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse60/global.json deleted file mode 100644 index 7a7ec0adddb3..000000000000 --- a/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse60/global.json +++ /dev/null @@ -1 +0,0 @@ -{ "sdk": { "version": "99.99.99" } } \ No newline at end of file diff --git a/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse60/nuget.config b/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse60/nuget.config deleted file mode 100644 index 0a62331d0a12..000000000000 --- a/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse60/nuget.config +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse60/ServiceReference/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse80/ServiceReference/Reference.cs similarity index 92% rename from src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse60/ServiceReference/Reference.cs rename to src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse80/ServiceReference/Reference.cs index 724d13840186..251a39f1e50c 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse60/ServiceReference/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse80/ServiceReference/Reference.cs @@ -7,12 +7,12 @@ // //------------------------------------------------------------------------------ -namespace TypeReuse60_NS +namespace TypeReuse80_NS { [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "99.99.99")] - [System.ServiceModel.ServiceContractAttribute(ConfigurationName="TypeReuse60_NS.ITypeReuseSvc")] + [System.ServiceModel.ServiceContractAttribute(ConfigurationName="TypeReuse80_NS.ITypeReuseSvc")] public interface ITypeReuseSvc { @@ -24,13 +24,13 @@ public interface ITypeReuseSvc } [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "99.99.99")] - public interface ITypeReuseSvcChannel : TypeReuse60_NS.ITypeReuseSvc, System.ServiceModel.IClientChannel + public interface ITypeReuseSvcChannel : TypeReuse80_NS.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, TypeReuse60_NS.ITypeReuseSvc + public partial class TypeReuseSvcClient : System.ServiceModel.ClientBase, TypeReuse80_NS.ITypeReuseSvc { /// @@ -88,11 +88,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/TypeReuse/TypeReuse60/ServiceReference/dotnet-svcutil.params.json b/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse80/ServiceReference/dotnet-svcutil.params.json similarity index 96% rename from src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse60/ServiceReference/dotnet-svcutil.params.json rename to src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse80/ServiceReference/dotnet-svcutil.params.json index f391638139b3..a2b47bd109d6 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse60/ServiceReference/dotnet-svcutil.params.json +++ b/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse80/ServiceReference/dotnet-svcutil.params.json @@ -6,13 +6,13 @@ "../../TypeReuseSvc.wsdl" ], "namespaceMappings": [ - "*, TypeReuse60_NS" + "*, TypeReuse80_NS" ], "outputFile": "Reference.cs", "references": [ - "$resultPath$//TestResults//TypeReuse//TypeReuse60//bin//Debug//net6.0//BinLib.dll", - "$resultPath$//TestResults//TypeReuse//TypeReuse60//bin//Debug//net6.0//TypesLib.dll", "dotnet-svcutil-lib, {dotnet-svcutil-lib, 99.99.99}", + "$resultPath$//TestResults//TypeReuse//TypeReuse80//bin//Debug//net8.0//BinLib.dll", + "$resultPath$//TestResults//TypeReuse//TypeReuse80//bin//Debug//net8.0//TypesLib.dll", "Microsoft.ApplicationInsights, {Microsoft.ApplicationInsights, 99.99.99}", "Microsoft.DotNet.InternalAbstractions, {Microsoft.DotNet.InternalAbstractions, 99.99.99}", "Microsoft.Extensions.DependencyModel, {Microsoft.Extensions.DependencyModel, 99.99.99}", diff --git a/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse60/SvcutilBootstrapper/Microsoft.Tools.ServiceModel.Svcutil-bootstrapper.params.json b/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse80/SvcutilBootstrapper/Microsoft.Tools.ServiceModel.Svcutil-bootstrapper.params.json similarity index 93% rename from src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse60/SvcutilBootstrapper/Microsoft.Tools.ServiceModel.Svcutil-bootstrapper.params.json rename to src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse80/SvcutilBootstrapper/Microsoft.Tools.ServiceModel.Svcutil-bootstrapper.params.json index bf51bd9320e3..169510eb1e20 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse60/SvcutilBootstrapper/Microsoft.Tools.ServiceModel.Svcutil-bootstrapper.params.json +++ b/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse80/SvcutilBootstrapper/Microsoft.Tools.ServiceModel.Svcutil-bootstrapper.params.json @@ -5,20 +5,20 @@ "inputs": [ "$resultPath$/TestResults/TypeReuse/TypeReuseSvc.wsdl" ], - "bootstrapPath": "$resultPath$/TestResults/TypeReuse/TypeReuse60", + "bootstrapPath": "$resultPath$/TestResults/TypeReuse/TypeReuse80", "namespaceMappings": [ - "*, TypeReuse60_NS" + "*, TypeReuse80_NS" ], "noBootstrapping": true, "noLogo": true, "noProjectUpdates": true, - "outputDir": "$resultPath$/TestResults/TypeReuse/TypeReuse60/ServiceReference", - "outputFile": "$resultPath$/TestResults/TypeReuse/TypeReuse60/ServiceReference/Reference.cs", - "projectFile": "$resultPath$/TestResults/TypeReuse/TypeReuse60/TypeReuse60.csproj", + "outputDir": "$resultPath$/TestResults/TypeReuse/TypeReuse80/ServiceReference", + "outputFile": "$resultPath$/TestResults/TypeReuse/TypeReuse80/ServiceReference/Reference.cs", + "projectFile": "$resultPath$/TestResults/TypeReuse/TypeReuse80/TypeReuse80.csproj", "references": [ - "$resultPath$//TestResults//TypeReuse//TypeReuse60//bin//Debug//net6.0//BinLib.dll", - "$resultPath$//TestResults//TypeReuse//TypeReuse60//bin//Debug//net6.0//TypesLib.dll", "dotnet-svcutil-lib, {dotnet-svcutil-lib, 99.99.99}", + "$resultPath$//TestResults//TypeReuse//TypeReuse80//bin//Debug//net8.0//BinLib.dll", + "$resultPath$//TestResults//TypeReuse//TypeReuse80//bin//Debug//net8.0//TypesLib.dll", "Microsoft.ApplicationInsights, {Microsoft.ApplicationInsights, 99.99.99}", "Microsoft.DotNet.InternalAbstractions, {Microsoft.DotNet.InternalAbstractions, 99.99.99}", "Microsoft.Extensions.DependencyModel, {Microsoft.Extensions.DependencyModel, 99.99.99}", diff --git a/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse60/SvcutilBootstrapper/SvcutilBootstrapper.csproj b/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse80/SvcutilBootstrapper/SvcutilBootstrapper.csproj similarity index 95% rename from src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse60/SvcutilBootstrapper/SvcutilBootstrapper.csproj rename to src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse80/SvcutilBootstrapper/SvcutilBootstrapper.csproj index ec9e15fbc004..37759d14e784 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse60/SvcutilBootstrapper/SvcutilBootstrapper.csproj +++ b/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse80/SvcutilBootstrapper/SvcutilBootstrapper.csproj @@ -9,13 +9,13 @@ - $resultPath$/TestResults/TypeReuse/TypeReuse60/bin/Debug/DOTNET_VERSION/dotnet-svcutil-lib.dll + $resultPath$/TestResults/TypeReuse/TypeReuse80/bin/Debug/DOTNET_VERSION/dotnet-svcutil-lib.dll - $resultPath$/TestResults/TypeReuse/TypeReuse60/bin/Debug/net6.0/BinLib.dll + $resultPath$/TestResults/TypeReuse/TypeReuse80/bin/Debug/net8.0/BinLib.dll - $resultPath$/TestResults/TypeReuse/TypeReuse60/bin/Debug/net6.0/TypesLib.dll + $resultPath$/TestResults/TypeReuse/TypeReuse80/bin/Debug/net8.0/TypesLib.dll diff --git a/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse60/TypeReuse60.csproj b/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse80/TypeReuse80.csproj similarity index 92% rename from src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse60/TypeReuse60.csproj rename to src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse80/TypeReuse80.csproj index 7c7ea09ff231..fc6c0906bf2e 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse60/TypeReuse60.csproj +++ b/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse80/TypeReuse80.csproj @@ -4,6 +4,8 @@ Exe N.N latest + enable + enable diff --git a/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnetcoreapp3_1/global.json b/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse80/global.json similarity index 100% rename from src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnetcoreapp3_1/global.json rename to src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse80/global.json diff --git a/src/dotnet-svcutil/lib/tests/src/E2ETests.cs b/src/dotnet-svcutil/lib/tests/src/E2ETests.cs index 49bbd41a1483..659b9b22f5ab 100644 --- a/src/dotnet-svcutil/lib/tests/src/E2ETests.cs +++ b/src/dotnet-svcutil/lib/tests/src/E2ETests.cs @@ -204,7 +204,7 @@ public void NamespaceParam(string testCaseName, string options, bool expectSucce [Trait("Category", "BVT")] [Theory] - [InlineData("TypeReuse60", "net6.0")] + [InlineData("TypeReuse80", "net8.0")] public void TypeReuse(string testCaseName, string targetFramework) { this_TestCaseName = "TypeReuse"; diff --git a/src/dotnet-svcutil/lib/tests/src/GlobalToolTests.cs b/src/dotnet-svcutil/lib/tests/src/GlobalToolTests.cs index ccbef773011d..2e9e946fbe88 100644 --- a/src/dotnet-svcutil/lib/tests/src/GlobalToolTests.cs +++ b/src/dotnet-svcutil/lib/tests/src/GlobalToolTests.cs @@ -107,13 +107,13 @@ public void FullFramework(string testCaseName) [Trait("Category", "BVT")] [Theory] - [InlineData("net6.0", "-elm")] + [InlineData("net8.0", "-elm")] public void ParamsFiles_SDK_TFM(string targetFramework, string extraOptions) { this_TestCaseName = "ParamsFiles_SDK_TFM"; TestFixture(); var testCaseName = $"TF{targetFramework}".Replace(".", "_"); - InitializeGlobal(testCaseName, targetFramework: "net6.0", g_SdkVersion); + InitializeGlobal(testCaseName, targetFramework: targetFramework, g_SdkVersion); this_TestCaseProject.TargetFramework = targetFramework; this_TestCaseProject.SaveAsync(this_TestCaseLogger, System.Threading.CancellationToken.None).Wait(); @@ -124,7 +124,7 @@ public void ParamsFiles_SDK_TFM(string targetFramework, string extraOptions) var paramsFilePath = Path.Combine(this_TestCaseOutputDir, $"{testCaseName}.params.json"); var options = new Microsoft.Tools.ServiceModel.Svcutil.SvcutilOptions(); options.Inputs.Add(new Uri(url)); - options.References.Add(Microsoft.Tools.ServiceModel.Svcutil.ProjectDependency.FromPackage("Newtonsoft.Json", "13.0.1")); + options.References.Add(Microsoft.Tools.ServiceModel.Svcutil.ProjectDependency.FromPackage("Newtonsoft.Json", "13.0.2")); options.OutputDir = new DirectoryInfo(this_TestCaseOutputDir); options.BootstrapPath = new DirectoryInfo(this_TestCaseBootstrapDir); options.NamespaceMappings.Add(new System.Collections.Generic.KeyValuePair("*", ns));