Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generate C# class from WSDL file

Tags:

c#

.net

wsdl

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

like image 449
Kirill F Avatar asked Oct 25 '25 03:10

Kirill F


1 Answers

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.

like image 169
Arun_Raja1 Avatar answered Oct 26 '25 18:10

Arun_Raja1



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!