views:

24

answers:

1

When you add a Web Reference in an ASP.NET project in Visual Studio the web application's root namespace is always added.

So, if I add a web reference called MyWebService and the default namespace of the application is MyApplication the namespace of the generated proxy class will be: MyApplication.MyWebService.

However, I want to be able to specify which namespace to use for the generated class (to skip the default namespace and have the namespace be called simply MyWebService).

Is using wsdl.exe through the command line the only way of accomplishing this? I don't want to manually edit the generated class (since it can get re-generated).

Any help is greatly appreciated! :)

A: 

Almost seems using wsdl.exe is the only option?

I resorted to using a pre-build event for generating the proxy class. Put out a post on how I did it here.

Ted Nyberg