From dcad2e6fdde5ff2534958b7ce011cf371f39474c Mon Sep 17 00:00:00 2001 From: Carol Wang Date: Tue, 21 Mar 2023 16:41:09 +0800 Subject: [PATCH 1/7] 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 | 8 +- 23 files changed, 40 insertions(+), 353 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 5f31844e1b7..00000000000 --- 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 405cf1ae720..9bf5899c6a9 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 9c06387c92c..b88317b8880 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 042a5820af3..0b404517c96 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 4abe1c0d8d8..119b1b87e10 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 4b6e2d99351..00000000000 --- 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 c49aca35a83..00000000000 --- 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 31492323aec..00000000000 --- 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 0446395bb15..00000000000 --- 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 8d60ea96930..00000000000 --- 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 188ef615cd1..00000000000 --- 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 d2d3627bf81..00000000000 --- 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 7a7ec0adddb..00000000000 --- 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 0a62331d0a1..00000000000 --- 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 724d1384018..251a39f1e50 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 f391638139b..a2b47bd109d 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 bf51bd9320e..169510eb1e2 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 ec9e15fbc00..37759d14e78 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 7c7ea09ff23..fc6c0906bf2 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 57be8d0d5c7..4aa23438462 100644 --- a/src/dotnet-svcutil/lib/tests/src/E2ETests.cs +++ b/src/dotnet-svcutil/lib/tests/src/E2ETests.cs @@ -203,7 +203,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 be683bb7a8a..870614d517b 100644 --- a/src/dotnet-svcutil/lib/tests/src/GlobalToolTests.cs +++ b/src/dotnet-svcutil/lib/tests/src/GlobalToolTests.cs @@ -170,13 +170,13 @@ public async Task MultiTargetTypeReuse() [Trait("Category", "BVT")] [Theory] - [InlineData("net6.0", "-elm")] - public async Task ParamsFiles_SDK_TFM(string targetFramework, string extraOptions) + [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; await this_TestCaseProject.SaveAsync(this_TestCaseLogger, System.Threading.CancellationToken.None); @@ -187,7 +187,7 @@ public async Task ParamsFiles_SDK_TFM(string targetFramework, string extraOption 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)); From 032d9e6cd95e17033f897bb86659e49f0f15d686 Mon Sep 17 00:00:00 2001 From: Carol Wang Date: Tue, 4 Jul 2023 03:27:09 +0000 Subject: [PATCH 2/7] Update test to use default target framework instead of update to use latest for each new release. --- .../TFnet8_0 => ParamsFiles/elm}/Reference.cs | 16 ++++++++-------- .../elm}/dotnet-svcutil.params.json | 2 +- .../elm/elm.csproj} | 1 - .../elm/elm.params.json} | 10 +++++----- .../ServiceReference/Reference.cs | 8 ++++---- .../ServiceReference/dotnet-svcutil.params.json | 6 +++--- ...ServiceModel.Svcutil-bootstrapper.params.json | 14 +++++++------- .../SvcutilBootstrapper.csproj | 6 +++--- .../TypeReuse.csproj} | 1 - .../TFnet8_0 => TypeReuse/TypeReuse}/global.json | 0 .../Baselines/TypeReuse/TypeReuse80/global.json | 1 - src/dotnet-svcutil/lib/tests/src/E2ETests.cs | 6 +++--- .../lib/tests/src/GlobalToolTests.cs | 13 ++++++------- 13 files changed, 40 insertions(+), 44 deletions(-) rename src/dotnet-svcutil/lib/tests/Baselines/{ParamsFiles_SDK_TFM/TFnet8_0 => ParamsFiles/elm}/Reference.cs (91%) rename src/dotnet-svcutil/lib/tests/Baselines/{ParamsFiles_SDK_TFM/TFnet8_0 => ParamsFiles/elm}/dotnet-svcutil.params.json (94%) rename src/dotnet-svcutil/lib/tests/Baselines/{ParamsFiles_SDK_TFM/TFnet8_0/TFnet8_0.csproj => ParamsFiles/elm/elm.csproj} (94%) rename src/dotnet-svcutil/lib/tests/Baselines/{ParamsFiles_SDK_TFM/TFnet8_0/TFnet8_0.params.json => ParamsFiles/elm/elm.params.json} (52%) rename src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/{TypeReuse80 => TypeReuse}/ServiceReference/Reference.cs (96%) rename src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/{TypeReuse80 => TypeReuse}/ServiceReference/dotnet-svcutil.params.json (96%) rename src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/{TypeReuse80 => TypeReuse}/SvcutilBootstrapper/Microsoft.Tools.ServiceModel.Svcutil-bootstrapper.params.json (92%) rename src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/{TypeReuse80 => TypeReuse}/SvcutilBootstrapper/SvcutilBootstrapper.csproj (94%) rename src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/{TypeReuse80/TypeReuse80.csproj => TypeReuse/TypeReuse.csproj} (96%) rename src/dotnet-svcutil/lib/tests/Baselines/{ParamsFiles_SDK_TFM/TFnet8_0 => TypeReuse/TypeReuse}/global.json (100%) delete mode 100644 src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse80/global.json diff --git a/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnet8_0/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles/elm/Reference.cs similarity index 91% rename from src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnet8_0/Reference.cs rename to src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles/elm/Reference.cs index 9bf5899c6a9..3e3c52671ee 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnet8_0/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles/elm/Reference.cs @@ -7,7 +7,7 @@ // //------------------------------------------------------------------------------ -namespace TFnet8_0_NS +namespace elm_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="TFnet8_0_NS.ITypeReuseSvc")] + [System.ServiceModel.ServiceContractAttribute(ConfigurationName="elm_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(TFnet8_0_NS.TypeReuseCompositeType composite); + System.Threading.Tasks.Task GetDataUsingDataContractAsync(elm_NS.TypeReuseCompositeType composite); } [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "99.99.99")] - public interface ITypeReuseSvcChannel : TFnet8_0_NS.ITypeReuseSvc, System.ServiceModel.IClientChannel + public interface ITypeReuseSvcChannel : elm_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, TFnet8_0_NS.ITypeReuseSvc + public partial class TypeReuseSvcClient : System.ServiceModel.ClientBase, elm_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(TFnet8_0_NS.TypeReuseCompositeType composite) + public System.Threading.Tasks.Task GetDataUsingDataContractAsync(elm_NS.TypeReuseCompositeType composite) { return base.Channel.GetDataUsingDataContractAsync(composite); } diff --git a/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnet8_0/dotnet-svcutil.params.json b/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles/elm/dotnet-svcutil.params.json similarity index 94% rename from src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnet8_0/dotnet-svcutil.params.json rename to src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles/elm/dotnet-svcutil.params.json index 119b1b87e10..cbb25078fbc 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnet8_0/dotnet-svcutil.params.json +++ b/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles/elm/dotnet-svcutil.params.json @@ -6,7 +6,7 @@ "../../../../../src/dotnet-svcutil/lib/tests/TestCases/wsdl/Simple.wsdl" ], "namespaceMappings": [ - "*, TFnet8_0_NS" + "*, elm_NS" ], "outputFile": "Reference.cs", "references": [ diff --git a/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnet8_0/TFnet8_0.csproj b/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles/elm/elm.csproj similarity index 94% rename from src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnet8_0/TFnet8_0.csproj rename to src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles/elm/elm.csproj index b88317b8880..346742f0a5f 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnet8_0/TFnet8_0.csproj +++ b/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles/elm/elm.csproj @@ -3,7 +3,6 @@ Exe N.N - latest enable enable diff --git a/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnet8_0/TFnet8_0.params.json b/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles/elm/elm.params.json similarity index 52% rename from src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnet8_0/TFnet8_0.params.json rename to src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles/elm/elm.params.json index 0b404517c96..f8a25c78287 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnet8_0/TFnet8_0.params.json +++ b/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles/elm/elm.params.json @@ -1,18 +1,18 @@ { - "providerId": "TFnet8_0", + "providerId": "elm", "version": "99.99.99", "options": { "inputs": [ "$testCasesPath$/wsdl/Simple.wsdl" ], - "bootstrapPath": "$resultPath$/TestBootstrap/ParamsFiles_SDK_TFM/TFnet8_0", + "bootstrapPath": "$resultPath$/TestBootstrap/ParamsFiles/elm", "namespaceMappings": [ - "*, TFnet8_0_NS" + "*, elm_NS" ], "noLogo": true, "noTelemetry": true, - "outputDir": "$resultPath$/TestResults/ParamsFiles_SDK_TFM/TFnet8_0", - "projectFile": "$resultPath$/TestResults/ParamsFiles_SDK_TFM/TFnet8_0/TFnet8_0.csproj", + "outputDir": "$resultPath$/TestResults/ParamsFiles/elm", + "projectFile": "$resultPath$/TestResults/ParamsFiles/elm/elm.csproj", "references": [ "Newtonsoft.Json, {Newtonsoft.Json, 99.99.99}" ], diff --git a/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse80/ServiceReference/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse/ServiceReference/Reference.cs similarity index 96% rename from src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse80/ServiceReference/Reference.cs rename to src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse/ServiceReference/Reference.cs index 251a39f1e50..b4c58940cf5 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse80/ServiceReference/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse/ServiceReference/Reference.cs @@ -7,12 +7,12 @@ // //------------------------------------------------------------------------------ -namespace TypeReuse80_NS +namespace TypeReuse_NS { [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "99.99.99")] - [System.ServiceModel.ServiceContractAttribute(ConfigurationName="TypeReuse80_NS.ITypeReuseSvc")] + [System.ServiceModel.ServiceContractAttribute(ConfigurationName="TypeReuse_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 : TypeReuse80_NS.ITypeReuseSvc, System.ServiceModel.IClientChannel + public interface ITypeReuseSvcChannel : TypeReuse_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, TypeReuse80_NS.ITypeReuseSvc + public partial class TypeReuseSvcClient : System.ServiceModel.ClientBase, TypeReuse_NS.ITypeReuseSvc { /// diff --git a/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse80/ServiceReference/dotnet-svcutil.params.json b/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse/ServiceReference/dotnet-svcutil.params.json similarity index 96% rename from src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse80/ServiceReference/dotnet-svcutil.params.json rename to src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse/ServiceReference/dotnet-svcutil.params.json index a2b47bd109d..f74209cb70e 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse80/ServiceReference/dotnet-svcutil.params.json +++ b/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse/ServiceReference/dotnet-svcutil.params.json @@ -6,13 +6,13 @@ "../../TypeReuseSvc.wsdl" ], "namespaceMappings": [ - "*, TypeReuse80_NS" + "*, TypeReuse_NS" ], "outputFile": "Reference.cs", "references": [ "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", + "$resultPath$//TestResults//TypeReuse//TypeReuse//bin//Debug//net8.0//BinLib.dll", + "$resultPath$//TestResults//TypeReuse//TypeReuse//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/TypeReuse80/SvcutilBootstrapper/Microsoft.Tools.ServiceModel.Svcutil-bootstrapper.params.json b/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse/SvcutilBootstrapper/Microsoft.Tools.ServiceModel.Svcutil-bootstrapper.params.json similarity index 92% rename from src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse80/SvcutilBootstrapper/Microsoft.Tools.ServiceModel.Svcutil-bootstrapper.params.json rename to src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse/SvcutilBootstrapper/Microsoft.Tools.ServiceModel.Svcutil-bootstrapper.params.json index 169510eb1e2..65440663c70 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse80/SvcutilBootstrapper/Microsoft.Tools.ServiceModel.Svcutil-bootstrapper.params.json +++ b/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse/SvcutilBootstrapper/Microsoft.Tools.ServiceModel.Svcutil-bootstrapper.params.json @@ -5,20 +5,20 @@ "inputs": [ "$resultPath$/TestResults/TypeReuse/TypeReuseSvc.wsdl" ], - "bootstrapPath": "$resultPath$/TestResults/TypeReuse/TypeReuse80", + "bootstrapPath": "$resultPath$/TestResults/TypeReuse/TypeReuse", "namespaceMappings": [ - "*, TypeReuse80_NS" + "*, TypeReuse_NS" ], "noBootstrapping": true, "noLogo": true, "noProjectUpdates": true, - "outputDir": "$resultPath$/TestResults/TypeReuse/TypeReuse80/ServiceReference", - "outputFile": "$resultPath$/TestResults/TypeReuse/TypeReuse80/ServiceReference/Reference.cs", - "projectFile": "$resultPath$/TestResults/TypeReuse/TypeReuse80/TypeReuse80.csproj", + "outputDir": "$resultPath$/TestResults/TypeReuse/TypeReuse/ServiceReference", + "outputFile": "$resultPath$/TestResults/TypeReuse/TypeReuse/ServiceReference/Reference.cs", + "projectFile": "$resultPath$/TestResults/TypeReuse/TypeReuse/TypeReuse.csproj", "references": [ "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", + "$resultPath$//TestResults//TypeReuse//TypeReuse//bin//Debug//net8.0//BinLib.dll", + "$resultPath$//TestResults//TypeReuse//TypeReuse//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/TypeReuse80/SvcutilBootstrapper/SvcutilBootstrapper.csproj b/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse/SvcutilBootstrapper/SvcutilBootstrapper.csproj similarity index 94% rename from src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse80/SvcutilBootstrapper/SvcutilBootstrapper.csproj rename to src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse/SvcutilBootstrapper/SvcutilBootstrapper.csproj index 37759d14e78..b2079980919 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse80/SvcutilBootstrapper/SvcutilBootstrapper.csproj +++ b/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse/SvcutilBootstrapper/SvcutilBootstrapper.csproj @@ -9,13 +9,13 @@ - $resultPath$/TestResults/TypeReuse/TypeReuse80/bin/Debug/DOTNET_VERSION/dotnet-svcutil-lib.dll + $resultPath$/TestResults/TypeReuse/TypeReuse/bin/Debug/DOTNET_VERSION/dotnet-svcutil-lib.dll - $resultPath$/TestResults/TypeReuse/TypeReuse80/bin/Debug/net8.0/BinLib.dll + $resultPath$/TestResults/TypeReuse/TypeReuse/bin/Debug/net8.0/BinLib.dll - $resultPath$/TestResults/TypeReuse/TypeReuse80/bin/Debug/net8.0/TypesLib.dll + $resultPath$/TestResults/TypeReuse/TypeReuse/bin/Debug/net8.0/TypesLib.dll diff --git a/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse80/TypeReuse80.csproj b/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse/TypeReuse.csproj similarity index 96% rename from src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse80/TypeReuse80.csproj rename to src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse/TypeReuse.csproj index fc6c0906bf2..91bdd59170b 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse80/TypeReuse80.csproj +++ b/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse/TypeReuse.csproj @@ -3,7 +3,6 @@ Exe N.N - latest enable enable diff --git a/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnet8_0/global.json b/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse/global.json similarity index 100% rename from src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles_SDK_TFM/TFnet8_0/global.json rename to src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse/global.json diff --git a/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse80/global.json b/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse80/global.json deleted file mode 100644 index 7a7ec0adddb..00000000000 --- a/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse80/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/src/E2ETests.cs b/src/dotnet-svcutil/lib/tests/src/E2ETests.cs index 4aa23438462..5fc5cd4fe73 100644 --- a/src/dotnet-svcutil/lib/tests/src/E2ETests.cs +++ b/src/dotnet-svcutil/lib/tests/src/E2ETests.cs @@ -203,12 +203,12 @@ public void NamespaceParam(string testCaseName, string options, bool expectSucce [Trait("Category", "BVT")] [Theory] - [InlineData("TypeReuse80", "net8.0")] - public void TypeReuse(string testCaseName, string targetFramework) + [InlineData("TypeReuse")] + public void TypeReuse(string testCaseName) { this_TestCaseName = "TypeReuse"; TestFixture(); - InitializeE2E(testCaseName, createUniqueProject: true, targetFramework: targetFramework, sdkVersion: g_SdkVersion); + InitializeE2E(testCaseName, createUniqueProject: true); var uri = SetupProjectDependencies(); var outDir = Path.Combine(this_TestCaseOutputDir, "ServiceReference"); diff --git a/src/dotnet-svcutil/lib/tests/src/GlobalToolTests.cs b/src/dotnet-svcutil/lib/tests/src/GlobalToolTests.cs index 870614d517b..00b2642f935 100644 --- a/src/dotnet-svcutil/lib/tests/src/GlobalToolTests.cs +++ b/src/dotnet-svcutil/lib/tests/src/GlobalToolTests.cs @@ -170,18 +170,17 @@ public async Task MultiTargetTypeReuse() [Trait("Category", "BVT")] [Theory] - [InlineData("net8.0", "-elm")] - public void ParamsFiles_SDK_TFM(string targetFramework, string extraOptions) + [InlineData("-elm")] + public void ParamsFiles(string extraOptions) { - this_TestCaseName = "ParamsFiles_SDK_TFM"; + this_TestCaseName = "ParamsFiles"; TestFixture(); - var testCaseName = $"TF{targetFramework}".Replace(".", "_"); - InitializeGlobal(testCaseName, targetFramework: targetFramework, g_SdkVersion); - this_TestCaseProject.TargetFramework = targetFramework; + var testCaseName = extraOptions.Substring(1); + InitializeGlobal(testCaseName); await this_TestCaseProject.SaveAsync(this_TestCaseLogger, System.Threading.CancellationToken.None); var url = $"{Path.Combine(g_TestCasesDir, "wsdl", "Simple.wsdl")}"; - var ns = testCaseName.Replace(".", "_") + "_NS"; + var ns = testCaseName + "_NS"; // generate params file from options var paramsFilePath = Path.Combine(this_TestCaseOutputDir, $"{testCaseName}.params.json"); From aa02b5cc23d59bbedee13c9c4fc3100ed400301b Mon Sep 17 00:00:00 2001 From: Carol Wang Date: Fri, 19 Jan 2024 06:40:34 +0000 Subject: [PATCH 3/7] rebase and fix test failure due to product upgrade. --- .../ServiceReference/dotnet-svcutil.params.json | 4 ++-- ...ols.ServiceModel.Svcutil-bootstrapper.params.json | 4 ++-- .../SvcutilBootstrapper/SvcutilBootstrapper.csproj | 7 +++++-- .../Baselines/TypeReuse/TypeReuse/TypeReuse.csproj | 3 +++ src/dotnet-svcutil/lib/tests/src/FixupUtil.cs | 12 ++++++++++++ src/dotnet-svcutil/lib/tests/src/GlobalToolTests.cs | 2 +- 6 files changed, 25 insertions(+), 7 deletions(-) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse/ServiceReference/dotnet-svcutil.params.json b/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse/ServiceReference/dotnet-svcutil.params.json index f74209cb70e..50b9a2b5a40 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse/ServiceReference/dotnet-svcutil.params.json +++ b/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse/ServiceReference/dotnet-svcutil.params.json @@ -11,8 +11,8 @@ "outputFile": "Reference.cs", "references": [ "dotnet-svcutil-lib, {dotnet-svcutil-lib, 99.99.99}", - "$resultPath$//TestResults//TypeReuse//TypeReuse//bin//Debug//net8.0//BinLib.dll", - "$resultPath$//TestResults//TypeReuse//TypeReuse//bin//Debug//net8.0//TypesLib.dll", + "$resultPath$//TestResults//TypeReuse//TypeReuse//bin//Debug//DOTNET_VERSION//BinLib.dll", + "$resultPath$//TestResults//TypeReuse//TypeReuse//bin//Debug//DOTNET_VERSION//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/TypeReuse/SvcutilBootstrapper/Microsoft.Tools.ServiceModel.Svcutil-bootstrapper.params.json b/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse/SvcutilBootstrapper/Microsoft.Tools.ServiceModel.Svcutil-bootstrapper.params.json index 65440663c70..ae383633ff3 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse/SvcutilBootstrapper/Microsoft.Tools.ServiceModel.Svcutil-bootstrapper.params.json +++ b/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse/SvcutilBootstrapper/Microsoft.Tools.ServiceModel.Svcutil-bootstrapper.params.json @@ -17,8 +17,8 @@ "projectFile": "$resultPath$/TestResults/TypeReuse/TypeReuse/TypeReuse.csproj", "references": [ "dotnet-svcutil-lib, {dotnet-svcutil-lib, 99.99.99}", - "$resultPath$//TestResults//TypeReuse//TypeReuse//bin//Debug//net8.0//BinLib.dll", - "$resultPath$//TestResults//TypeReuse//TypeReuse//bin//Debug//net8.0//TypesLib.dll", + "$resultPath$//TestResults//TypeReuse//TypeReuse//bin//Debug//DOTNET_VERSION//BinLib.dll", + "$resultPath$//TestResults//TypeReuse//TypeReuse//bin//Debug//DOTNET_VERSION//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/TypeReuse/SvcutilBootstrapper/SvcutilBootstrapper.csproj b/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse/SvcutilBootstrapper/SvcutilBootstrapper.csproj index b2079980919..247d38de842 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse/SvcutilBootstrapper/SvcutilBootstrapper.csproj +++ b/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse/SvcutilBootstrapper/SvcutilBootstrapper.csproj @@ -11,12 +11,15 @@ $resultPath$/TestResults/TypeReuse/TypeReuse/bin/Debug/DOTNET_VERSION/dotnet-svcutil-lib.dll + - $resultPath$/TestResults/TypeReuse/TypeReuse/bin/Debug/net8.0/BinLib.dll + $resultPath$/TestResults/TypeReuse/TypeReuse/bin/Debug/DOTNET_VERSION/BinLib.dll - $resultPath$/TestResults/TypeReuse/TypeReuse/bin/Debug/net8.0/TypesLib.dll + $resultPath$/TestResults/TypeReuse/TypeReuse/bin/Debug/DOTNET_VERSION/TypesLib.dll + + diff --git a/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse/TypeReuse.csproj b/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse/TypeReuse.csproj index 91bdd59170b..20846a90893 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse/TypeReuse.csproj +++ b/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse/TypeReuse.csproj @@ -8,6 +8,9 @@ + + + $resultPath$/TestResults/TypeReuse/BinLib/bin/Debug/netstandard1.3/BinLib.dll diff --git a/src/dotnet-svcutil/lib/tests/src/FixupUtil.cs b/src/dotnet-svcutil/lib/tests/src/FixupUtil.cs index c22e4c4aef3..76b6b7dff70 100644 --- a/src/dotnet-svcutil/lib/tests/src/FixupUtil.cs +++ b/src/dotnet-svcutil/lib/tests/src/FixupUtil.cs @@ -88,6 +88,18 @@ public void Init(string resultsPath, string testCasesPath, string projectPath, s _replacements.Add(new ReplaceInfo(@"net(coreapp)?\d+\.\d+\\dotnet-svcutil-lib.dll", "DOTNET_VERSION\\dotnet-svcutil-lib.dll") { UseRegex = true }); //for windows _replacements.Add(new ReplaceInfo(@"net(coreapp)?\d+\.\d+/any/dotnet-svcutil-lib.dll", "DOTNET_VERSION/any/dotnet-svcutil-lib.dll") { UseRegex = true }); //for linux _replacements.Add(new ReplaceInfo(@"net(coreapp)?\d+\.\d+\\any\\dotnet-svcutil-lib.dll", "DOTNET_VERSION\\any\\dotnet-svcutil-lib.dll") { UseRegex = true }); //for windows + _replacements.Add(new ReplaceInfo(@"net\d+\.\d+/any/internalAssets", "DOTNET_VERSION/any/internalAssets") { UseRegex = true }); + _replacements.Add(new ReplaceInfo(@"net\d+\.\d+\\any\\internalAssets", "DOTNET_VERSION\\any\\internalAssets") { UseRegex = true }); + _replacements.Add(new ReplaceInfo(@"net\d+\.\d+/internalAssets", "DOTNET_VERSION/internalAssets") { UseRegex = true }); + _replacements.Add(new ReplaceInfo(@"net\d+\.\d+\\internalAssets", "DOTNET_VERSION\\internalAssets") { UseRegex = true }); + _replacements.Add(new ReplaceInfo(@"net\d+\.\d+//BinLib.dll", "DOTNET_VERSION//BinLib.dll") { UseRegex = true }); + _replacements.Add(new ReplaceInfo(@"net\d+\.\d+//TypesLib.dll", "DOTNET_VERSION//TypesLib.dll") { UseRegex = true }); + _replacements.Add(new ReplaceInfo(@"net\d+\.\d+\\\\BinLib.dll", "DOTNET_VERSION\\\\BinLib.dll") { UseRegex = true }); + _replacements.Add(new ReplaceInfo(@"net\d+\.\d+\\\\TypesLib.dll", "DOTNET_VERSION\\\\TypesLib.dll") { UseRegex = true }); + _replacements.Add(new ReplaceInfo(@"net\d+\.\d+/BinLib.dll", "DOTNET_VERSION/BinLib.dll") { UseRegex = true }); + _replacements.Add(new ReplaceInfo(@"net\d+\.\d+/TypesLib.dll", "DOTNET_VERSION/TypesLib.dll") { UseRegex = true }); + _replacements.Add(new ReplaceInfo(@"net\d+\.\d+\\BinLib.dll", "DOTNET_VERSION\\BinLib.dll") { UseRegex = true }); + _replacements.Add(new ReplaceInfo(@"net\d+\.\d+\\TypesLib.dll", "DOTNET_VERSION\\TypesLib.dll") { UseRegex = true }); _replacements.Add(new ReplaceInfo(@"Release\Shipping", @"RelType/ShipType")); _replacements.Add(new ReplaceInfo(@"Release\NonShipping", @"RelType/ShipType")); _replacements.Add(new ReplaceInfo(@"Debug\Shipping", @"RelType/ShipType")); diff --git a/src/dotnet-svcutil/lib/tests/src/GlobalToolTests.cs b/src/dotnet-svcutil/lib/tests/src/GlobalToolTests.cs index 00b2642f935..a870a221b26 100644 --- a/src/dotnet-svcutil/lib/tests/src/GlobalToolTests.cs +++ b/src/dotnet-svcutil/lib/tests/src/GlobalToolTests.cs @@ -171,7 +171,7 @@ public async Task MultiTargetTypeReuse() [Trait("Category", "BVT")] [Theory] [InlineData("-elm")] - public void ParamsFiles(string extraOptions) + public async void ParamsFiles(string extraOptions) { this_TestCaseName = "ParamsFiles"; TestFixture(); From 634a6c52147277b639c17e09de623ac48c423ad3 Mon Sep 17 00:00:00 2001 From: Carol Wang Date: Thu, 28 Mar 2024 10:21:55 +0800 Subject: [PATCH 4/7] Rebase and update test baselines. --- .../TypeReuseClient/ServiceReference/dotnet-svcutil.params.json | 2 +- .../lib/tests/Baselines/ParamsFiles/elm/elm.csproj | 1 + .../lib/tests/Baselines/TypeReuse/TypeReuse/TypeReuse.csproj | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/MultiTargetTypeReuse/TypeReuseClient/ServiceReference/dotnet-svcutil.params.json b/src/dotnet-svcutil/lib/tests/Baselines/MultiTargetTypeReuse/TypeReuseClient/ServiceReference/dotnet-svcutil.params.json index db493e18ee4..456cf54d31d 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/MultiTargetTypeReuse/TypeReuseClient/ServiceReference/dotnet-svcutil.params.json +++ b/src/dotnet-svcutil/lib/tests/Baselines/MultiTargetTypeReuse/TypeReuseClient/ServiceReference/dotnet-svcutil.params.json @@ -10,7 +10,7 @@ ], "outputFile": "Reference.cs", "references": [ - "$TEMP$MultiTargetTypeReuse//TypeReuseClient//bin//Debug//net6.0//BinLib.dll" + "$TEMP$MultiTargetTypeReuse//TypeReuseClient//bin//Debug//DOTNET_VERSION//BinLib.dll" ], "targetFramework": "N.N", "typeReuseMode": "All" diff --git a/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles/elm/elm.csproj b/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles/elm/elm.csproj index 346742f0a5f..f42e50e51ce 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles/elm/elm.csproj +++ b/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles/elm/elm.csproj @@ -12,5 +12,6 @@ + \ No newline at end of file diff --git a/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse/TypeReuse.csproj b/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse/TypeReuse.csproj index 20846a90893..45fa9514ecd 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse/TypeReuse.csproj +++ b/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse/TypeReuse.csproj @@ -24,5 +24,6 @@ + \ No newline at end of file From 9b30ab65156f9355057ac1489182e699155f8e98 Mon Sep 17 00:00:00 2001 From: Carol Wang Date: Thu, 22 May 2025 16:55:42 +0800 Subject: [PATCH 5/7] Fix test baseline due to prodcut upgrade and add netstandard20 typereuse test scenario. --- .../lib/src/Shared/TargetFrameworkHelper.cs | 2 +- .../urlNamespace/dotnet-svcutil.params.json | 28 +-- .../dotnet-svcutil.params.json | 28 +-- .../ServiceReference/Reference.cs | 175 ++++++++++++++++++ .../dotnet-svcutil.params.json | 18 ++ .../TypeReuseClient/TypeReuseClient.csproj | 18 ++ .../Baselines/ParamsFiles/elm/Reference.cs | 7 + .../Baselines/ParamsFiles/elm/elm.csproj | 3 - .../TypeReuse/ServiceReference/Reference.cs | 7 + .../dotnet-svcutil.params.json | 54 +----- ...viceModel.Svcutil-bootstrapper.params.json | 54 +----- .../SvcutilBootstrapper.csproj | 56 +----- .../TypeReuse/TypeReuse/TypeReuse.csproj | 7 +- .../Netstandard20TypeReuse/BinLib/BinLib.dll | Bin 0 -> 4096 bytes .../TypeReuseClient/Class1.cs | 9 + .../TypeReuseClient/TypeReuseClient.csproj | 11 ++ src/dotnet-svcutil/lib/tests/src/E2ETests.cs | 6 +- src/dotnet-svcutil/lib/tests/src/FixupUtil.cs | 6 +- .../lib/tests/src/GlobalToolTests.cs | 37 +++- 19 files changed, 294 insertions(+), 232 deletions(-) create mode 100644 src/dotnet-svcutil/lib/tests/Baselines/NetStandard20TypeReuse/TypeReuseClient/ServiceReference/Reference.cs create mode 100644 src/dotnet-svcutil/lib/tests/Baselines/NetStandard20TypeReuse/TypeReuseClient/ServiceReference/dotnet-svcutil.params.json create mode 100644 src/dotnet-svcutil/lib/tests/Baselines/NetStandard20TypeReuse/TypeReuseClient/TypeReuseClient.csproj create mode 100644 src/dotnet-svcutil/lib/tests/TestCases/Netstandard20TypeReuse/BinLib/BinLib.dll create mode 100644 src/dotnet-svcutil/lib/tests/TestCases/Netstandard20TypeReuse/TypeReuseClient/Class1.cs create mode 100644 src/dotnet-svcutil/lib/tests/TestCases/Netstandard20TypeReuse/TypeReuseClient/TypeReuseClient.csproj diff --git a/src/dotnet-svcutil/lib/src/Shared/TargetFrameworkHelper.cs b/src/dotnet-svcutil/lib/src/Shared/TargetFrameworkHelper.cs index 994961301cf..d01297a8971 100644 --- a/src/dotnet-svcutil/lib/src/Shared/TargetFrameworkHelper.cs +++ b/src/dotnet-svcutil/lib/src/Shared/TargetFrameworkHelper.cs @@ -13,7 +13,7 @@ namespace Microsoft.Tools.ServiceModel.Svcutil { internal class TargetFrameworkHelper { - internal static readonly List s_currentSupportedVersions = new List() { "8.0", "9.0" }; + internal static readonly List s_currentSupportedVersions = new List() { "8.0", "9.0", "10.0" }; public static Version MinSupportedNetFxVersionForDotNet { get; } = new Version("4.5"); public static Version MinSupportedNetStandardVersion { get; } = new Version("1.3"); public static Version MinSupportedNetCoreAppVersion { get; } = new Version("1.0"); diff --git a/src/dotnet-svcutil/lib/tests/Baselines/NamespaceParam/urlNamespace/dotnet-svcutil.params.json b/src/dotnet-svcutil/lib/tests/Baselines/NamespaceParam/urlNamespace/dotnet-svcutil.params.json index 869ac08855d..5e7f70fb146 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/NamespaceParam/urlNamespace/dotnet-svcutil.params.json +++ b/src/dotnet-svcutil/lib/tests/Baselines/NamespaceParam/urlNamespace/dotnet-svcutil.params.json @@ -12,7 +12,6 @@ "references": [ "dotnet-svcutil-lib, {dotnet-svcutil-lib, 99.99.99}", "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}", "Newtonsoft.Json, {Newtonsoft.Json, 99.99.99}", "NuGet.Common, {NuGet.Common, 99.99.99}", @@ -24,33 +23,8 @@ "NuGet.ProjectModel, {NuGet.ProjectModel, 99.99.99}", "NuGet.Protocol, {NuGet.Protocol, 99.99.99}", "NuGet.Versioning, {NuGet.Versioning, 99.99.99}", - "System.AppContext, {System.AppContext, 99.99.99}", - "System.Collections, {System.Collections, 99.99.99}", - "System.Diagnostics.Debug, {System.Diagnostics.Debug, 99.99.99}", - "System.Diagnostics.DiagnosticSource, {System.Diagnostics.DiagnosticSource, 99.99.99}", - "System.Dynamic.Runtime, {System.Dynamic.Runtime, 99.99.99}", - "System.IO, {System.IO, 99.99.99}", - "System.IO.FileSystem, {System.IO.FileSystem, 99.99.99}", - "System.IO.FileSystem.Primitives, {System.IO.FileSystem.Primitives, 99.99.99}", - "System.Linq, {System.Linq, 99.99.99}", - "System.Linq.Expressions, {System.Linq.Expressions, 99.99.99}", - "System.ObjectModel, {System.ObjectModel, 99.99.99}", - "System.Reflection, {System.Reflection, 99.99.99}", - "System.Reflection.Emit, {System.Reflection.Emit, 99.99.99}", - "System.Reflection.Emit.ILGeneration, {System.Reflection.Emit.ILGeneration, 99.99.99}", - "System.Reflection.Primitives, {System.Reflection.Primitives, 99.99.99}", - "System.Reflection.TypeExtensions, {System.Reflection.TypeExtensions, 99.99.99}", - "System.Runtime, {System.Runtime, 99.99.99}", - "System.Runtime.Extensions, {System.Runtime.Extensions, 99.99.99}", - "System.Runtime.Handles, {System.Runtime.Handles, 99.99.99}", - "System.Runtime.InteropServices, {System.Runtime.InteropServices, 99.99.99}", - "System.Runtime.InteropServices.RuntimeInformation, {System.Runtime.InteropServices.RuntimeInformation, 99.99.99}", - "System.Runtime.Loader, {System.Runtime.Loader, 99.99.99}", - "System.Security.Cryptography.Cng, {System.Security.Cryptography.Cng, 99.99.99}", "System.Security.Cryptography.Pkcs, {System.Security.Cryptography.Pkcs, 99.99.99}", - "System.Security.Cryptography.ProtectedData, {System.Security.Cryptography.ProtectedData, 99.99.99}", - "System.Text.Encoding, {System.Text.Encoding, 99.99.99}", - "System.Threading.Tasks, {System.Threading.Tasks, 99.99.99}" + "System.Security.Cryptography.ProtectedData, {System.Security.Cryptography.ProtectedData, 99.99.99}" ], "targetFramework": "N.N", "typeReuseMode": "All" diff --git a/src/dotnet-svcutil/lib/tests/Baselines/NamespaceParam/wildcardNamespace/dotnet-svcutil.params.json b/src/dotnet-svcutil/lib/tests/Baselines/NamespaceParam/wildcardNamespace/dotnet-svcutil.params.json index 31cfcaa4477..258f7d394cf 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/NamespaceParam/wildcardNamespace/dotnet-svcutil.params.json +++ b/src/dotnet-svcutil/lib/tests/Baselines/NamespaceParam/wildcardNamespace/dotnet-svcutil.params.json @@ -12,7 +12,6 @@ "references": [ "dotnet-svcutil-lib, {dotnet-svcutil-lib, 99.99.99}", "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}", "Newtonsoft.Json, {Newtonsoft.Json, 99.99.99}", "NuGet.Common, {NuGet.Common, 99.99.99}", @@ -24,33 +23,8 @@ "NuGet.ProjectModel, {NuGet.ProjectModel, 99.99.99}", "NuGet.Protocol, {NuGet.Protocol, 99.99.99}", "NuGet.Versioning, {NuGet.Versioning, 99.99.99}", - "System.AppContext, {System.AppContext, 99.99.99}", - "System.Collections, {System.Collections, 99.99.99}", - "System.Diagnostics.Debug, {System.Diagnostics.Debug, 99.99.99}", - "System.Diagnostics.DiagnosticSource, {System.Diagnostics.DiagnosticSource, 99.99.99}", - "System.Dynamic.Runtime, {System.Dynamic.Runtime, 99.99.99}", - "System.IO, {System.IO, 99.99.99}", - "System.IO.FileSystem, {System.IO.FileSystem, 99.99.99}", - "System.IO.FileSystem.Primitives, {System.IO.FileSystem.Primitives, 99.99.99}", - "System.Linq, {System.Linq, 99.99.99}", - "System.Linq.Expressions, {System.Linq.Expressions, 99.99.99}", - "System.ObjectModel, {System.ObjectModel, 99.99.99}", - "System.Reflection, {System.Reflection, 99.99.99}", - "System.Reflection.Emit, {System.Reflection.Emit, 99.99.99}", - "System.Reflection.Emit.ILGeneration, {System.Reflection.Emit.ILGeneration, 99.99.99}", - "System.Reflection.Primitives, {System.Reflection.Primitives, 99.99.99}", - "System.Reflection.TypeExtensions, {System.Reflection.TypeExtensions, 99.99.99}", - "System.Runtime, {System.Runtime, 99.99.99}", - "System.Runtime.Extensions, {System.Runtime.Extensions, 99.99.99}", - "System.Runtime.Handles, {System.Runtime.Handles, 99.99.99}", - "System.Runtime.InteropServices, {System.Runtime.InteropServices, 99.99.99}", - "System.Runtime.InteropServices.RuntimeInformation, {System.Runtime.InteropServices.RuntimeInformation, 99.99.99}", - "System.Runtime.Loader, {System.Runtime.Loader, 99.99.99}", - "System.Security.Cryptography.Cng, {System.Security.Cryptography.Cng, 99.99.99}", "System.Security.Cryptography.Pkcs, {System.Security.Cryptography.Pkcs, 99.99.99}", - "System.Security.Cryptography.ProtectedData, {System.Security.Cryptography.ProtectedData, 99.99.99}", - "System.Text.Encoding, {System.Text.Encoding, 99.99.99}", - "System.Threading.Tasks, {System.Threading.Tasks, 99.99.99}" + "System.Security.Cryptography.ProtectedData, {System.Security.Cryptography.ProtectedData, 99.99.99}" ], "targetFramework": "N.N", "typeReuseMode": "All" diff --git a/src/dotnet-svcutil/lib/tests/Baselines/NetStandard20TypeReuse/TypeReuseClient/ServiceReference/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/NetStandard20TypeReuse/TypeReuseClient/ServiceReference/Reference.cs new file mode 100644 index 00000000000..1a34b2c01c9 --- /dev/null +++ b/src/dotnet-svcutil/lib/tests/Baselines/NetStandard20TypeReuse/TypeReuseClient/ServiceReference/Reference.cs @@ -0,0 +1,175 @@ +//------------------------------------------------------------------------------ +// +// 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="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)); + } + + #if !NET6_0_OR_GREATER + 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)); + } + #endif + + 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/NetStandard20TypeReuse/TypeReuseClient/ServiceReference/dotnet-svcutil.params.json b/src/dotnet-svcutil/lib/tests/Baselines/NetStandard20TypeReuse/TypeReuseClient/ServiceReference/dotnet-svcutil.params.json new file mode 100644 index 00000000000..764feac78f5 --- /dev/null +++ b/src/dotnet-svcutil/lib/tests/Baselines/NetStandard20TypeReuse/TypeReuseClient/ServiceReference/dotnet-svcutil.params.json @@ -0,0 +1,18 @@ +{ + "providerId": "Microsoft.Tools.ServiceModel.Svcutil", + "version": "99.99.99", + "options": { + "inputs": [ + "$testCasesPath$/wsdl/TypeReuseSvc.wsdl" + ], + "namespaceMappings": [ + "*, ServiceReference" + ], + "outputFile": "Reference.cs", + "references": [ + "$TEMP$NetStandard20TypeReuse//TypeReuseClient//bin//Debug//netstandard2.0//BinLib.dll" + ], + "targetFramework": "netstandard2.0", + "typeReuseMode": "All" + } +} \ No newline at end of file diff --git a/src/dotnet-svcutil/lib/tests/Baselines/NetStandard20TypeReuse/TypeReuseClient/TypeReuseClient.csproj b/src/dotnet-svcutil/lib/tests/Baselines/NetStandard20TypeReuse/TypeReuseClient/TypeReuseClient.csproj new file mode 100644 index 00000000000..d7e74c46c8b --- /dev/null +++ b/src/dotnet-svcutil/lib/tests/Baselines/NetStandard20TypeReuse/TypeReuseClient/TypeReuseClient.csproj @@ -0,0 +1,18 @@ + + + + netstandard2.0 + + + + ../BinLib/BinLib.dll + + + + + + + + + + \ No newline at end of file diff --git a/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles/elm/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles/elm/Reference.cs index 3e3c52671ee..7b8b6b7357f 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles/elm/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles/elm/Reference.cs @@ -148,6 +148,13 @@ 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)); } + #if !NET6_0_OR_GREATER + 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)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.BasicHttpBinding_ITypeReuseSvc)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles/elm/elm.csproj b/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles/elm/elm.csproj index f42e50e51ce..c2d91e178fd 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles/elm/elm.csproj +++ b/src/dotnet-svcutil/lib/tests/Baselines/ParamsFiles/elm/elm.csproj @@ -10,8 +10,5 @@ - - - \ No newline at end of file diff --git a/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse/ServiceReference/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse/ServiceReference/Reference.cs index b4c58940cf5..1e90de02521 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse/ServiceReference/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse/ServiceReference/Reference.cs @@ -88,6 +88,13 @@ 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)); } + #if !NET6_0_OR_GREATER + 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)); + } + #endif + private static System.ServiceModel.Channels.Binding GetBindingForEndpoint(EndpointConfiguration endpointConfiguration) { if ((endpointConfiguration == EndpointConfiguration.BasicHttpBinding_ITypeReuseSvc)) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse/ServiceReference/dotnet-svcutil.params.json b/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse/ServiceReference/dotnet-svcutil.params.json index 50b9a2b5a40..8e84660483c 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse/ServiceReference/dotnet-svcutil.params.json +++ b/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse/ServiceReference/dotnet-svcutil.params.json @@ -14,9 +14,7 @@ "$resultPath$//TestResults//TypeReuse//TypeReuse//bin//Debug//DOTNET_VERSION//BinLib.dll", "$resultPath$//TestResults//TypeReuse//TypeReuse//bin//Debug//DOTNET_VERSION//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}", - "Microsoft.Win32.Primitives, {Microsoft.Win32.Primitives, 99.99.99}", "Newtonsoft.Json, {Newtonsoft.Json, 99.99.99}", "NuGet.Common, {NuGet.Common, 99.99.99}", "NuGet.Configuration, {NuGet.Configuration, 99.99.99}", @@ -27,58 +25,8 @@ "NuGet.ProjectModel, {NuGet.ProjectModel, 99.99.99}", "NuGet.Protocol, {NuGet.Protocol, 99.99.99}", "NuGet.Versioning, {NuGet.Versioning, 99.99.99}", - "System.AppContext, {System.AppContext, 99.99.99}", - "System.Collections, {System.Collections, 99.99.99}", - "System.Collections.Concurrent, {System.Collections.Concurrent, 99.99.99}", - "System.Console, {System.Console, 99.99.99}", - "System.Diagnostics.Debug, {System.Diagnostics.Debug, 99.99.99}", - "System.Diagnostics.DiagnosticSource, {System.Diagnostics.DiagnosticSource, 99.99.99}", - "System.Diagnostics.Tools, {System.Diagnostics.Tools, 99.99.99}", - "System.Diagnostics.Tracing, {System.Diagnostics.Tracing, 99.99.99}", - "System.Dynamic.Runtime, {System.Dynamic.Runtime, 99.99.99}", - "System.Globalization, {System.Globalization, 99.99.99}", - "System.Globalization.Calendars, {System.Globalization.Calendars, 99.99.99}", - "System.IO, {System.IO, 99.99.99}", - "System.IO.Compression, {System.IO.Compression, 99.99.99}", - "System.IO.Compression.ZipFile, {System.IO.Compression.ZipFile, 99.99.99}", - "System.IO.FileSystem, {System.IO.FileSystem, 99.99.99}", - "System.IO.FileSystem.Primitives, {System.IO.FileSystem.Primitives, 99.99.99}", - "System.Linq, {System.Linq, 99.99.99}", - "System.Linq.Expressions, {System.Linq.Expressions, 99.99.99}", - "System.Net.Http, {System.Net.Http, 99.99.99}", - "System.Net.Primitives, {System.Net.Primitives, 99.99.99}", - "System.Net.Sockets, {System.Net.Sockets, 99.99.99}", - "System.ObjectModel, {System.ObjectModel, 99.99.99}", - "System.Reflection, {System.Reflection, 99.99.99}", - "System.Reflection.Emit, {System.Reflection.Emit, 99.99.99}", - "System.Reflection.Emit.ILGeneration, {System.Reflection.Emit.ILGeneration, 99.99.99}", - "System.Reflection.Extensions, {System.Reflection.Extensions, 99.99.99}", - "System.Reflection.Primitives, {System.Reflection.Primitives, 99.99.99}", - "System.Reflection.TypeExtensions, {System.Reflection.TypeExtensions, 99.99.99}", - "System.Resources.ResourceManager, {System.Resources.ResourceManager, 99.99.99}", - "System.Runtime, {System.Runtime, 99.99.99}", - "System.Runtime.Extensions, {System.Runtime.Extensions, 99.99.99}", - "System.Runtime.Handles, {System.Runtime.Handles, 99.99.99}", - "System.Runtime.InteropServices, {System.Runtime.InteropServices, 99.99.99}", - "System.Runtime.InteropServices.RuntimeInformation, {System.Runtime.InteropServices.RuntimeInformation, 99.99.99}", - "System.Runtime.Loader, {System.Runtime.Loader, 99.99.99}", - "System.Runtime.Numerics, {System.Runtime.Numerics, 99.99.99}", - "System.Runtime.Serialization.Primitives, {System.Runtime.Serialization.Primitives, 99.99.99}", - "System.Security.Cryptography.Algorithms, {System.Security.Cryptography.Algorithms, 99.99.99}", - "System.Security.Cryptography.Cng, {System.Security.Cryptography.Cng, 99.99.99}", - "System.Security.Cryptography.Encoding, {System.Security.Cryptography.Encoding, 99.99.99}", "System.Security.Cryptography.Pkcs, {System.Security.Cryptography.Pkcs, 99.99.99}", - "System.Security.Cryptography.Primitives, {System.Security.Cryptography.Primitives, 99.99.99}", - "System.Security.Cryptography.ProtectedData, {System.Security.Cryptography.ProtectedData, 99.99.99}", - "System.Security.Cryptography.X509Certificates, {System.Security.Cryptography.X509Certificates, 99.99.99}", - "System.Text.Encoding, {System.Text.Encoding, 99.99.99}", - "System.Text.Encoding.Extensions, {System.Text.Encoding.Extensions, 99.99.99}", - "System.Text.RegularExpressions, {System.Text.RegularExpressions, 99.99.99}", - "System.Threading, {System.Threading, 99.99.99}", - "System.Threading.Tasks, {System.Threading.Tasks, 99.99.99}", - "System.Threading.Timer, {System.Threading.Timer, 99.99.99}", - "System.Xml.ReaderWriter, {System.Xml.ReaderWriter, 99.99.99}", - "System.Xml.XDocument, {System.Xml.XDocument, 99.99.99}" + "System.Security.Cryptography.ProtectedData, {System.Security.Cryptography.ProtectedData, 99.99.99}" ], "targetFramework": "N.N", "typeReuseMode": "All" diff --git a/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse/SvcutilBootstrapper/Microsoft.Tools.ServiceModel.Svcutil-bootstrapper.params.json b/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse/SvcutilBootstrapper/Microsoft.Tools.ServiceModel.Svcutil-bootstrapper.params.json index ae383633ff3..f69a26852ac 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse/SvcutilBootstrapper/Microsoft.Tools.ServiceModel.Svcutil-bootstrapper.params.json +++ b/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse/SvcutilBootstrapper/Microsoft.Tools.ServiceModel.Svcutil-bootstrapper.params.json @@ -20,9 +20,7 @@ "$resultPath$//TestResults//TypeReuse//TypeReuse//bin//Debug//DOTNET_VERSION//BinLib.dll", "$resultPath$//TestResults//TypeReuse//TypeReuse//bin//Debug//DOTNET_VERSION//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}", - "Microsoft.Win32.Primitives, {Microsoft.Win32.Primitives, 99.99.99}", "Newtonsoft.Json, {Newtonsoft.Json, 99.99.99}", "NuGet.Common, {NuGet.Common, 99.99.99}", "NuGet.Configuration, {NuGet.Configuration, 99.99.99}", @@ -33,58 +31,8 @@ "NuGet.ProjectModel, {NuGet.ProjectModel, 99.99.99}", "NuGet.Protocol, {NuGet.Protocol, 99.99.99}", "NuGet.Versioning, {NuGet.Versioning, 99.99.99}", - "System.AppContext, {System.AppContext, 99.99.99}", - "System.Collections, {System.Collections, 99.99.99}", - "System.Collections.Concurrent, {System.Collections.Concurrent, 99.99.99}", - "System.Console, {System.Console, 99.99.99}", - "System.Diagnostics.Debug, {System.Diagnostics.Debug, 99.99.99}", - "System.Diagnostics.DiagnosticSource, {System.Diagnostics.DiagnosticSource, 99.99.99}", - "System.Diagnostics.Tools, {System.Diagnostics.Tools, 99.99.99}", - "System.Diagnostics.Tracing, {System.Diagnostics.Tracing, 99.99.99}", - "System.Dynamic.Runtime, {System.Dynamic.Runtime, 99.99.99}", - "System.Globalization, {System.Globalization, 99.99.99}", - "System.Globalization.Calendars, {System.Globalization.Calendars, 99.99.99}", - "System.IO, {System.IO, 99.99.99}", - "System.IO.Compression, {System.IO.Compression, 99.99.99}", - "System.IO.Compression.ZipFile, {System.IO.Compression.ZipFile, 99.99.99}", - "System.IO.FileSystem, {System.IO.FileSystem, 99.99.99}", - "System.IO.FileSystem.Primitives, {System.IO.FileSystem.Primitives, 99.99.99}", - "System.Linq, {System.Linq, 99.99.99}", - "System.Linq.Expressions, {System.Linq.Expressions, 99.99.99}", - "System.Net.Http, {System.Net.Http, 99.99.99}", - "System.Net.Primitives, {System.Net.Primitives, 99.99.99}", - "System.Net.Sockets, {System.Net.Sockets, 99.99.99}", - "System.ObjectModel, {System.ObjectModel, 99.99.99}", - "System.Reflection, {System.Reflection, 99.99.99}", - "System.Reflection.Emit, {System.Reflection.Emit, 99.99.99}", - "System.Reflection.Emit.ILGeneration, {System.Reflection.Emit.ILGeneration, 99.99.99}", - "System.Reflection.Extensions, {System.Reflection.Extensions, 99.99.99}", - "System.Reflection.Primitives, {System.Reflection.Primitives, 99.99.99}", - "System.Reflection.TypeExtensions, {System.Reflection.TypeExtensions, 99.99.99}", - "System.Resources.ResourceManager, {System.Resources.ResourceManager, 99.99.99}", - "System.Runtime, {System.Runtime, 99.99.99}", - "System.Runtime.Extensions, {System.Runtime.Extensions, 99.99.99}", - "System.Runtime.Handles, {System.Runtime.Handles, 99.99.99}", - "System.Runtime.InteropServices, {System.Runtime.InteropServices, 99.99.99}", - "System.Runtime.InteropServices.RuntimeInformation, {System.Runtime.InteropServices.RuntimeInformation, 99.99.99}", - "System.Runtime.Loader, {System.Runtime.Loader, 99.99.99}", - "System.Runtime.Numerics, {System.Runtime.Numerics, 99.99.99}", - "System.Runtime.Serialization.Primitives, {System.Runtime.Serialization.Primitives, 99.99.99}", - "System.Security.Cryptography.Algorithms, {System.Security.Cryptography.Algorithms, 99.99.99}", - "System.Security.Cryptography.Cng, {System.Security.Cryptography.Cng, 99.99.99}", - "System.Security.Cryptography.Encoding, {System.Security.Cryptography.Encoding, 99.99.99}", "System.Security.Cryptography.Pkcs, {System.Security.Cryptography.Pkcs, 99.99.99}", - "System.Security.Cryptography.Primitives, {System.Security.Cryptography.Primitives, 99.99.99}", - "System.Security.Cryptography.ProtectedData, {System.Security.Cryptography.ProtectedData, 99.99.99}", - "System.Security.Cryptography.X509Certificates, {System.Security.Cryptography.X509Certificates, 99.99.99}", - "System.Text.Encoding, {System.Text.Encoding, 99.99.99}", - "System.Text.Encoding.Extensions, {System.Text.Encoding.Extensions, 99.99.99}", - "System.Text.RegularExpressions, {System.Text.RegularExpressions, 99.99.99}", - "System.Threading, {System.Threading, 99.99.99}", - "System.Threading.Tasks, {System.Threading.Tasks, 99.99.99}", - "System.Threading.Timer, {System.Threading.Timer, 99.99.99}", - "System.Xml.ReaderWriter, {System.Xml.ReaderWriter, 99.99.99}", - "System.Xml.XDocument, {System.Xml.XDocument, 99.99.99}" + "System.Security.Cryptography.ProtectedData, {System.Security.Cryptography.ProtectedData, 99.99.99}" ], "targetFramework": "N.N", "toolContext": "Bootstrapper", diff --git a/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse/SvcutilBootstrapper/SvcutilBootstrapper.csproj b/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse/SvcutilBootstrapper/SvcutilBootstrapper.csproj index 247d38de842..d4e11106769 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse/SvcutilBootstrapper/SvcutilBootstrapper.csproj +++ b/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse/SvcutilBootstrapper/SvcutilBootstrapper.csproj @@ -11,7 +11,9 @@ $resultPath$/TestResults/TypeReuse/TypeReuse/bin/Debug/DOTNET_VERSION/dotnet-svcutil-lib.dll - + + + $resultPath$/TestResults/TypeReuse/TypeReuse/bin/Debug/DOTNET_VERSION/BinLib.dll @@ -22,9 +24,7 @@ - - @@ -35,57 +35,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse/TypeReuse.csproj b/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse/TypeReuse.csproj index 45fa9514ecd..cebb0fdf595 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse/TypeReuse.csproj +++ b/src/dotnet-svcutil/lib/tests/Baselines/TypeReuse/TypeReuse/TypeReuse.csproj @@ -8,7 +8,9 @@ - + + + @@ -22,8 +24,5 @@ - - - \ No newline at end of file diff --git a/src/dotnet-svcutil/lib/tests/TestCases/Netstandard20TypeReuse/BinLib/BinLib.dll b/src/dotnet-svcutil/lib/tests/TestCases/Netstandard20TypeReuse/BinLib/BinLib.dll new file mode 100644 index 0000000000000000000000000000000000000000..e03abb10acb4f492f9fbdba34d33ac72a8857738 GIT binary patch literal 4096 zcmd^CU2GIp6h3#`ZcBmE1|bkk9cTqCy0)}bkstfB1uFfcyA*^b?d*L1^SIatf z+R-ywQnxJI(-Km1a+YRTT68d`W$cuUEMH#T7=#|`A?g!lv^&>!zOdSlv_V@cnu)3) z3H#DZn=oq_9T-HliVpdCvw-tga26PHhB6vI$EN&OoCB6cfF8shWTFGhaU&MOIMFi5 zvKxuw3w4j;H9!4=Nfr2g1qO4(lhYpN%auSH2G<(o4N8GVG#+tWCkamF)&YVGt;Q&U z4rCv3q-n#DbER<%j#YzE0v$wMC9ERz+*bhS7NQC=H7tRi3l{zds1KcnYkAX#P}ysW z*cjTpLS@`UU9nfXL=c(toN9|SM_QX(TekB;SQ~g5@@_aoG>!QJ(=pF6thCD(RTX~u z4F_Yi3^YI1hP?-SqnMure~atkE%ze>HtNps_e4WaKA34{G992A~ zdB9iAOcVVj{5ecJ#9$~)A1FLQJ3}kThH02)=#B`}+oBQLDuur!rhiuWgpyoT^ifd> z`I!&_?RU2iimI$+ES;)$|N-Eww1TUExlJdlf#Q@T&^zz+pO}@aw><=q*JX3Tu?4 z?`VC1C+P=7b|Hz-QhFYECA|o|jt&7gU}HvT3w;FKN>_k)(C5J2bQ5^LlE;8MRJ3k7 ziZ~%uMD(rLqNp-(A-vb+XA2#IQUSjbs&N6ojy4Arrk(wEDrd^w)MZ$GMuK*Z=w?pt zo*WzN(vy?eUV98_rpS_>>*-cXcTyCUiCj7@oi4{d>FNnn#ys7V)NN<7hAExB(vl7Y zsZJ03Gm(SJ_h8e7vXUr8Rj2F9Ov22^4X@NAt~+Vz?ZNj`p0u6G#rAu!{D^d1!?qSH zd#wrE$><)Gy7^G6ZrhqL(mCWmFGy7P^nT{zl?m?aIgR4pPGI>al7#{m1{y&m1!g@K-ASSTcgNb zRX0zsoW1qj-2$Ko&jvqeukShkCYhD~l%!B(Ezy6y<{}8{gM=);SY`wwfUjS^r5`&MXdZ2ps z0S}az)Nx*9X*d>*C426CmAgK(@6ucET)X>j(-$10=cUnjJ}ZZ1&XpyUpZ=(wI6kVf zA1!(BQQ@esk7QE`itX#%x~-jp;O7g$QNZ*c`@YYf`}4P{+D{L@mkAD0&go62HKrCr z;jr~JW8JnBHO+qAuqfjuZAVJAT?4<_rx9jhsf%O&uM$3Mh}ICDogdaewee^d$=QzY z4u?C4W=cN5Gody}M<_;Pz&$h!suwq{0r0)Rd;D7$eOCVaKcy#a;k*7ayczhqQxaCm z_`Da0s*{5_2JQ_KF)f-PTj?8>R~%X$QWtuiJlNUbeE6iC?->F)d9X4dPd^~iJ!~RD z&2zstN`S`QjVdAUM!XDV)f#zJq=Su5nH&2xjO9cQjko$!>cg`CWi%u3@&C + + + netstandard2.0 + + + + ..\BinLib\BinLib.dll + + + diff --git a/src/dotnet-svcutil/lib/tests/src/E2ETests.cs b/src/dotnet-svcutil/lib/tests/src/E2ETests.cs index 5fc5cd4fe73..3b15a808896 100644 --- a/src/dotnet-svcutil/lib/tests/src/E2ETests.cs +++ b/src/dotnet-svcutil/lib/tests/src/E2ETests.cs @@ -55,7 +55,7 @@ private void TestSvcutil(string options, bool expectSuccess = true) ValidateTest(options, this_TestCaseProject.DirectoryPath, processResult.ExitCode, processResult.OutputText, expectSuccess); } - + [Theory] [Trait("Category", "BVT")] [InlineData("silent")] @@ -196,7 +196,7 @@ public void NamespaceParam(string testCaseName, string options, bool expectSucce InitializeE2E(testCaseName); var url = $"{Path.Combine(g_TestCasesDir, "wsdl", "WcfProjectNService", "tempuri.org.wsdl")}"; - var dir = $"-d ../{ testCaseName}"; + var dir = $"-d ../{testCaseName}"; TestSvcutil(dir + " " + url + " " + options, expectSuccess); } @@ -530,7 +530,7 @@ private void WcfRuntimeSvcs(string serviceName, bool expectSuccess) // need to find a way to keep this test running reliably. [Trait("Category", "Test")] [Fact] - + public void CheckBaslines() { this_TestCaseName = nameof(CheckBaslines); diff --git a/src/dotnet-svcutil/lib/tests/src/FixupUtil.cs b/src/dotnet-svcutil/lib/tests/src/FixupUtil.cs index 76b6b7dff70..b528dbd3a65 100644 --- a/src/dotnet-svcutil/lib/tests/src/FixupUtil.cs +++ b/src/dotnet-svcutil/lib/tests/src/FixupUtil.cs @@ -88,10 +88,8 @@ public void Init(string resultsPath, string testCasesPath, string projectPath, s _replacements.Add(new ReplaceInfo(@"net(coreapp)?\d+\.\d+\\dotnet-svcutil-lib.dll", "DOTNET_VERSION\\dotnet-svcutil-lib.dll") { UseRegex = true }); //for windows _replacements.Add(new ReplaceInfo(@"net(coreapp)?\d+\.\d+/any/dotnet-svcutil-lib.dll", "DOTNET_VERSION/any/dotnet-svcutil-lib.dll") { UseRegex = true }); //for linux _replacements.Add(new ReplaceInfo(@"net(coreapp)?\d+\.\d+\\any\\dotnet-svcutil-lib.dll", "DOTNET_VERSION\\any\\dotnet-svcutil-lib.dll") { UseRegex = true }); //for windows - _replacements.Add(new ReplaceInfo(@"net\d+\.\d+/any/internalAssets", "DOTNET_VERSION/any/internalAssets") { UseRegex = true }); - _replacements.Add(new ReplaceInfo(@"net\d+\.\d+\\any\\internalAssets", "DOTNET_VERSION\\any\\internalAssets") { UseRegex = true }); - _replacements.Add(new ReplaceInfo(@"net\d+\.\d+/internalAssets", "DOTNET_VERSION/internalAssets") { UseRegex = true }); - _replacements.Add(new ReplaceInfo(@"net\d+\.\d+\\internalAssets", "DOTNET_VERSION\\internalAssets") { UseRegex = true }); + _replacements.Add(new ReplaceInfo(@"net\d+\.\d+/net", "DOTNET_VERSION/net") { UseRegex = true }); + _replacements.Add(new ReplaceInfo(@"net\d+\.\d+\\net", "DOTNET_VERSION\\net") { UseRegex = true }); _replacements.Add(new ReplaceInfo(@"net\d+\.\d+//BinLib.dll", "DOTNET_VERSION//BinLib.dll") { UseRegex = true }); _replacements.Add(new ReplaceInfo(@"net\d+\.\d+//TypesLib.dll", "DOTNET_VERSION//TypesLib.dll") { UseRegex = true }); _replacements.Add(new ReplaceInfo(@"net\d+\.\d+\\\\BinLib.dll", "DOTNET_VERSION\\\\BinLib.dll") { UseRegex = true }); diff --git a/src/dotnet-svcutil/lib/tests/src/GlobalToolTests.cs b/src/dotnet-svcutil/lib/tests/src/GlobalToolTests.cs index a870a221b26..0b3fee48f78 100644 --- a/src/dotnet-svcutil/lib/tests/src/GlobalToolTests.cs +++ b/src/dotnet-svcutil/lib/tests/src/GlobalToolTests.cs @@ -102,7 +102,7 @@ public void FullFramework(string testCaseName) var uri = Path.Combine(g_TestCasesDir, "wsdl", "WcfProjectNService", "tempuri.org.wsdl"); var outDir = Path.Combine(this_TestCaseOutputDir, "ServiceReference"); var options = $"{uri} -nl -d {outDir} -tf netcoreapp1.0"; - + TestGlobalSvcutil(options, expectSuccess: true); } @@ -122,12 +122,12 @@ public async Task MultiTargetCloseAsyncGeneration(string testCaseName) this_TestGroupOutputDir = Path.Combine(Path.GetTempPath(), this_TestCaseName); this_TestCaseLogFile = Path.Combine(this_TestGroupOutputDir, $"{testCaseName}.log"); this_TestCaseOutputDir = Path.Combine(this_TestGroupOutputDir, testCaseName); - FileUtil.TryDeleteDirectory(this_TestCaseOutputDir); + FileUtil.TryDeleteDirectory(this_TestCaseOutputDir); Directory.CreateDirectory(this_TestCaseOutputDir); File.Copy(Path.Combine(g_TestCasesDir, this_TestCaseName, testCaseName, "Program.cs"), Path.Combine(this_TestCaseOutputDir, "Program.cs"), true); File.Copy(Path.Combine(g_TestCasesDir, this_TestCaseName, testCaseName, $"{testCaseName}.csproj"), Path.Combine(this_TestCaseOutputDir, $"{testCaseName}.csproj"), true); this_TestCaseProject = await MSBuildProj.FromPathAsync(Path.Combine(this_TestCaseOutputDir, $"{testCaseName}.csproj"), null, CancellationToken.None); - + this_FixupUtil = new FixupUtil(); this_FixupUtil.Init(g_TestResultsDir, g_TestCasesDir, this_TestCaseOutputDir, g_ServiceUrl, g_ServiceId, g_RepositoryRoot); @@ -167,11 +167,40 @@ public async Task MultiTargetTypeReuse() TestGlobalSvcutil(options, expectSuccess: true); } + [Trait("Category", "BVT")] + [Fact] + public async Task NetStandard20TypeReuse() + { + this_TestCaseName = "NetStandard20TypeReuse"; + TestFixture(); + string testClientFolder = "TypeReuseClient"; + this_TestCaseBaselinesDir = Path.Combine(this_TestGroupBaselinesDir, testClientFolder); + Directory.CreateDirectory(this_TestCaseBaselinesDir); + + this_TestGroupOutputDir = Path.Combine(Path.GetTempPath(), this_TestCaseName); + this_TestCaseLogFile = Path.Combine(this_TestGroupOutputDir, $"{this_TestCaseName}.log"); + this_TestCaseOutputDir = Path.Combine(this_TestGroupOutputDir, testClientFolder); + FileUtil.TryDeleteDirectory(this_TestCaseOutputDir); + Directory.CreateDirectory(this_TestCaseOutputDir); + FileUtil.CopyDirectory(Path.Combine(g_TestCasesDir, this_TestCaseName), this_TestGroupOutputDir, true); + this_TestCaseProject = await MSBuildProj.FromPathAsync(Path.Combine(this_TestCaseOutputDir, $"{testClientFolder}.csproj"), null, CancellationToken.None); + ProcessRunner.ProcessResult ret = await this_TestCaseProject.BuildAsync(true, this_TestCaseLogger, CancellationToken.None); + Assert.True(ret.ExitCode == 0, ret.OutputText); + + this_FixupUtil = new FixupUtil(); + this_FixupUtil.Init(g_TestResultsDir, g_TestCasesDir, this_TestCaseOutputDir, g_ServiceUrl, g_ServiceId, g_RepositoryRoot); + + var uri = Path.Combine(g_TestCasesDir, "wsdl", "TypeReuseSvc.wsdl"); + var outDir = Path.Combine(this_TestCaseOutputDir, "ServiceReference"); + var options = $"{uri} -nl --outputDir {outDir}"; + + TestGlobalSvcutil(options, expectSuccess: true); + } [Trait("Category", "BVT")] [Theory] [InlineData("-elm")] - public async void ParamsFiles(string extraOptions) + public async Task ParamsFiles(string extraOptions) { this_TestCaseName = "ParamsFiles"; TestFixture(); From e50d4d315ba48d0a4d92f215c6361029ab82f1b2 Mon Sep 17 00:00:00 2001 From: Carol Wang Date: Mon, 26 May 2025 13:51:49 +0800 Subject: [PATCH 6/7] Update test project to reference csproj instead of compiled assembly --- .../ServiceReference/Reference.cs | 35 +++++------------- .../dotnet-svcutil.params.json | 4 +- .../TypeReuseClient/TypeReuseClient.csproj | 4 +- .../Netstandard20TypeReuse/BinLib/BinLib.dll | Bin 4096 -> 0 bytes .../TypeReuseClient/TypeReuseClient.csproj | 4 +- .../TypesLib/CommonTypes.cs | 15 ++++++++ .../TypesLib/TypesLib.csproj | 11 ++++++ 7 files changed, 41 insertions(+), 32 deletions(-) delete mode 100644 src/dotnet-svcutil/lib/tests/TestCases/Netstandard20TypeReuse/BinLib/BinLib.dll create mode 100644 src/dotnet-svcutil/lib/tests/TestCases/Netstandard20TypeReuse/TypesLib/CommonTypes.cs create mode 100644 src/dotnet-svcutil/lib/tests/TestCases/Netstandard20TypeReuse/TypesLib/TypesLib.csproj diff --git a/src/dotnet-svcutil/lib/tests/Baselines/NetStandard20TypeReuse/TypeReuseClient/ServiceReference/Reference.cs b/src/dotnet-svcutil/lib/tests/Baselines/NetStandard20TypeReuse/TypeReuseClient/ServiceReference/Reference.cs index 1a34b2c01c9..ca4e96dc987 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/NetStandard20TypeReuse/TypeReuseClient/ServiceReference/Reference.cs +++ b/src/dotnet-svcutil/lib/tests/Baselines/NetStandard20TypeReuse/TypeReuseClient/ServiceReference/Reference.cs @@ -14,37 +14,22 @@ namespace ServiceReference [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 + [System.Runtime.Serialization.DataContractAttribute(Name="BinLibrary", Namespace="http://schemas.datacontract.org/2004/07/BinLib")] + public partial class BinLibrary : object { - private bool BoolValueField; - - private string StringValueField; - - [System.Runtime.Serialization.DataMemberAttribute()] - public bool BoolValue - { - get - { - return this.BoolValueField; - } - set - { - this.BoolValueField = value; - } - } + private string ValueField; [System.Runtime.Serialization.DataMemberAttribute()] - public string StringValue + public string Value { get { - return this.StringValueField; + return this.ValueField; } set { - this.StringValueField = value; + this.ValueField = value; } } } @@ -55,10 +40,10 @@ 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(ServiceReference.TypeReuseCompositeType composite); + System.Threading.Tasks.Task GetDataUsingDataContractAsync(TypesLib.TypeReuseCompositeType composite); } [System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Tools.ServiceModel.Svcutil", "99.99.99")] @@ -111,12 +96,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(ServiceReference.TypeReuseCompositeType composite) + public System.Threading.Tasks.Task GetDataUsingDataContractAsync(TypesLib.TypeReuseCompositeType composite) { return base.Channel.GetDataUsingDataContractAsync(composite); } diff --git a/src/dotnet-svcutil/lib/tests/Baselines/NetStandard20TypeReuse/TypeReuseClient/ServiceReference/dotnet-svcutil.params.json b/src/dotnet-svcutil/lib/tests/Baselines/NetStandard20TypeReuse/TypeReuseClient/ServiceReference/dotnet-svcutil.params.json index 764feac78f5..1376fb154f3 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/NetStandard20TypeReuse/TypeReuseClient/ServiceReference/dotnet-svcutil.params.json +++ b/src/dotnet-svcutil/lib/tests/Baselines/NetStandard20TypeReuse/TypeReuseClient/ServiceReference/dotnet-svcutil.params.json @@ -10,7 +10,9 @@ ], "outputFile": "Reference.cs", "references": [ - "$TEMP$NetStandard20TypeReuse//TypeReuseClient//bin//Debug//netstandard2.0//BinLib.dll" + "$TEMP$NetStandard20TypeReuse//TypeReuseClient//bin//Debug//netstandard2.0//TypesLib.dll", + "System.Runtime, {System.Runtime, 99.99.99}", + "System.Runtime.Serialization.Primitives, {System.Runtime.Serialization.Primitives, 99.99.99}" ], "targetFramework": "netstandard2.0", "typeReuseMode": "All" diff --git a/src/dotnet-svcutil/lib/tests/Baselines/NetStandard20TypeReuse/TypeReuseClient/TypeReuseClient.csproj b/src/dotnet-svcutil/lib/tests/Baselines/NetStandard20TypeReuse/TypeReuseClient/TypeReuseClient.csproj index d7e74c46c8b..73e32fd3907 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/NetStandard20TypeReuse/TypeReuseClient/TypeReuseClient.csproj +++ b/src/dotnet-svcutil/lib/tests/Baselines/NetStandard20TypeReuse/TypeReuseClient/TypeReuseClient.csproj @@ -4,9 +4,7 @@ netstandard2.0 - - ../BinLib/BinLib.dll - + diff --git a/src/dotnet-svcutil/lib/tests/TestCases/Netstandard20TypeReuse/BinLib/BinLib.dll b/src/dotnet-svcutil/lib/tests/TestCases/Netstandard20TypeReuse/BinLib/BinLib.dll deleted file mode 100644 index e03abb10acb4f492f9fbdba34d33ac72a8857738..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4096 zcmd^CU2GIp6h3#`ZcBmE1|bkk9cTqCy0)}bkstfB1uFfcyA*^b?d*L1^SIatf z+R-ywQnxJI(-Km1a+YRTT68d`W$cuUEMH#T7=#|`A?g!lv^&>!zOdSlv_V@cnu)3) z3H#DZn=oq_9T-HliVpdCvw-tga26PHhB6vI$EN&OoCB6cfF8shWTFGhaU&MOIMFi5 zvKxuw3w4j;H9!4=Nfr2g1qO4(lhYpN%auSH2G<(o4N8GVG#+tWCkamF)&YVGt;Q&U z4rCv3q-n#DbER<%j#YzE0v$wMC9ERz+*bhS7NQC=H7tRi3l{zds1KcnYkAX#P}ysW z*cjTpLS@`UU9nfXL=c(toN9|SM_QX(TekB;SQ~g5@@_aoG>!QJ(=pF6thCD(RTX~u z4F_Yi3^YI1hP?-SqnMure~atkE%ze>HtNps_e4WaKA34{G992A~ zdB9iAOcVVj{5ecJ#9$~)A1FLQJ3}kThH02)=#B`}+oBQLDuur!rhiuWgpyoT^ifd> z`I!&_?RU2iimI$+ES;)$|N-Eww1TUExlJdlf#Q@T&^zz+pO}@aw><=q*JX3Tu?4 z?`VC1C+P=7b|Hz-QhFYECA|o|jt&7gU}HvT3w;FKN>_k)(C5J2bQ5^LlE;8MRJ3k7 ziZ~%uMD(rLqNp-(A-vb+XA2#IQUSjbs&N6ojy4Arrk(wEDrd^w)MZ$GMuK*Z=w?pt zo*WzN(vy?eUV98_rpS_>>*-cXcTyCUiCj7@oi4{d>FNnn#ys7V)NN<7hAExB(vl7Y zsZJ03Gm(SJ_h8e7vXUr8Rj2F9Ov22^4X@NAt~+Vz?ZNj`p0u6G#rAu!{D^d1!?qSH zd#wrE$><)Gy7^G6ZrhqL(mCWmFGy7P^nT{zl?m?aIgR4pPGI>al7#{m1{y&m1!g@K-ASSTcgNb zRX0zsoW1qj-2$Ko&jvqeukShkCYhD~l%!B(Ezy6y<{}8{gM=);SY`wwfUjS^r5`&MXdZ2ps z0S}az)Nx*9X*d>*C426CmAgK(@6ucET)X>j(-$10=cUnjJ}ZZ1&XpyUpZ=(wI6kVf zA1!(BQQ@esk7QE`itX#%x~-jp;O7g$QNZ*c`@YYf`}4P{+D{L@mkAD0&go62HKrCr z;jr~JW8JnBHO+qAuqfjuZAVJAT?4<_rx9jhsf%O&uM$3Mh}ICDogdaewee^d$=QzY z4u?C4W=cN5Gody}M<_;Pz&$h!suwq{0r0)Rd;D7$eOCVaKcy#a;k*7ayczhqQxaCm z_`Da0s*{5_2JQ_KF)f-PTj?8>R~%X$QWtuiJlNUbeE6iC?->F)d9X4dPd^~iJ!~RD z&2zstN`S`QjVdAUM!XDV)f#zJq=Su5nH&2xjO9cQjko$!>cg`CWi%u3@&Cnetstandard2.0 - - ..\BinLib\BinLib.dll - + diff --git a/src/dotnet-svcutil/lib/tests/TestCases/Netstandard20TypeReuse/TypesLib/CommonTypes.cs b/src/dotnet-svcutil/lib/tests/TestCases/Netstandard20TypeReuse/TypesLib/CommonTypes.cs new file mode 100644 index 00000000000..2cc1fe630c3 --- /dev/null +++ b/src/dotnet-svcutil/lib/tests/TestCases/Netstandard20TypeReuse/TypesLib/CommonTypes.cs @@ -0,0 +1,15 @@ +using System; +using System.Runtime.Serialization; + +namespace TypesLib +{ + [DataContract] + public class TypeReuseCompositeType + { + [DataMember] + public bool BoolValue { get; set; } = true; + + [DataMember] + public string StringValue { get; set; } = "Hello "; + } +} diff --git a/src/dotnet-svcutil/lib/tests/TestCases/Netstandard20TypeReuse/TypesLib/TypesLib.csproj b/src/dotnet-svcutil/lib/tests/TestCases/Netstandard20TypeReuse/TypesLib/TypesLib.csproj new file mode 100644 index 00000000000..ac819923af6 --- /dev/null +++ b/src/dotnet-svcutil/lib/tests/TestCases/Netstandard20TypeReuse/TypesLib/TypesLib.csproj @@ -0,0 +1,11 @@ + + + + netstandard2.0 + + + + + + + From acbcbc6339adc6c1c98601db41ed9ba3ca699438 Mon Sep 17 00:00:00 2001 From: Carol Wang Date: Wed, 20 Aug 2025 10:09:28 +0000 Subject: [PATCH 7/7] Rebase and baseline fix. --- .../ServiceReference/dotnet-svcutil.params.json | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/dotnet-svcutil/lib/tests/Baselines/NetStandard20TypeReuse/TypeReuseClient/ServiceReference/dotnet-svcutil.params.json b/src/dotnet-svcutil/lib/tests/Baselines/NetStandard20TypeReuse/TypeReuseClient/ServiceReference/dotnet-svcutil.params.json index 1376fb154f3..14c8b97f484 100644 --- a/src/dotnet-svcutil/lib/tests/Baselines/NetStandard20TypeReuse/TypeReuseClient/ServiceReference/dotnet-svcutil.params.json +++ b/src/dotnet-svcutil/lib/tests/Baselines/NetStandard20TypeReuse/TypeReuseClient/ServiceReference/dotnet-svcutil.params.json @@ -10,9 +10,7 @@ ], "outputFile": "Reference.cs", "references": [ - "$TEMP$NetStandard20TypeReuse//TypeReuseClient//bin//Debug//netstandard2.0//TypesLib.dll", - "System.Runtime, {System.Runtime, 99.99.99}", - "System.Runtime.Serialization.Primitives, {System.Runtime.Serialization.Primitives, 99.99.99}" + "$TEMP$NetStandard20TypeReuse//TypeReuseClient//bin//Debug//netstandard2.0//TypesLib.dll" ], "targetFramework": "netstandard2.0", "typeReuseMode": "All"