I'm trying generate several C# classes from WSDL file. I tried to use an google to get information how I can convert it(Converting WSDL to C# classes), but unfortunately it doesn't help. If you can help me - thanks. My file at some website: https://Example/Example.wsdl - it's not correct way, just example. How I can convert it to C# class by VisualStudio 2019. enter image description here
Asked
Active
Viewed 6,496 times
0
-
Have you tried https://learn.microsoft.com/en-us/dotnet/core/additional-tools/wcf-web-service-reference-guide – ckuri Nov 22 '21 at 15:20
-
It's converted to asmx file and it doesn't create several files - its create only one. Attached screen with connected service – Kirill F Nov 22 '21 at 15:38
1 Answers
2
In your case there is a way to convert the file to c# file. Do as following.
Open Visual Studio Command prompt as a administrator by going to
Start menu > All Programs > Microsoft Visual Studio 2019 > Visual Studio Tools > Developer Command Prompt for VS 2019
.Put your WSDL file in somewhere accessible e.g. in this case I will put it in my C drive and getting output CS class in C drive too but you can change it. Type this command and press okay
C:\Program Files (x86)\Microsoft Visual Studio 19.0\VC>wsdl /l:C# /out:C:\OutPutClassName.cs C:\myWebService.wsdl
This process will create your WSDL file to the C# class file on the same folder.

Arun_Raja1
- 207
- 1
- 1