C# /CSharp

Create DLL from WSDL in C#

How to generate a DLL file from a WSDL in C#

As this was hard to get out I type this down if any other search for this.

I first of started to question how to turn a WSDL to a DLL, but then found out this must be done in 2 steps.

Generate file.cs file from project.wsdl
[ccl_csharp]wsdl /out:file.cs project.wsdl[/ccl_csharp]

Then the next step was to use csc.exe, but somehow this have been moved in Windows 7, I finally discovered that the files existed in path

[ccl_dos]C:\Windows\Microsoft.NET\Framework64\v4.0.30319[/ccl_dos]

So add this to your system path to be able to run in cmd

 

Also for my wsdl project I had to copy a bunch of DLL files from

[ccl_dos]C:\Windows\Microsoft.NET\Framework\v2.0.50727[/ccl_dos]

to the location where the wsdl and generated cs file existed.

 

Then by using csc.exe and some reference added to the path, it was possible to create a dll file

[ccl_dos]csc /target:library file.cs /reference:System.Web.dll /reference:System.Web.Services.dll /reference:System.dll /reference:System.Data.dll /reference:System.XML.dll [/ccl_dos]

2 thoughts on “Create DLL from WSDL in C#

  1. Site admins…. ARE YOU INSANE???
    What the f*ckin banner in the header? 😀 Have you tried to READ the conten, then body’s height ALWAYS changes…..

Leave a Reply

Your email address will not be published. Required fields are marked *