Using Web References in Delphi.Net

While trying to port an existing C# application from Visual Studio to Delphi.Net I discovered two things:

  1. Delphi.Net requires the .Net SDK tool disco.exe, which Visual Studio does not.  For reasons that are unclear, disco.exe was not present on my development machine.  Even though Visual Studio and (presumably) the .Net SDK were both installed.  Re-installing the .Net SDK fixed the problem.
  2. When Delphi.Net creates the Web References it puts them in the same namespace as the project.  Visual Studio, on the other hand, puts each Web Reference into its own namespace.   For example, myproj.webref1, myproj.webref2, etc.  Probably 99%of the time this won’t be an issue but in my case two of the Web References defined the same class name.  This caused compile errors in Delphi.Net but not in Visual Studio.  Manually putting each Web Reference into its own namespace fixed the problem.

Leave a Reply