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

wsdl /out:file.cs project.wsdl

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


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


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

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

2 Responses to "Create DLL from WSDL in C#"

  1. 5r4ytry Posted on August 13, 2013 at 11:57 | Permalink

    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…..

  2. Andreas Mattisson Posted on August 20, 2013 at 10:15 | Permalink

    Thanks for the replay, I have hanged it now.

Leave a Reply