
440
|
Chapter 13, Enhancing Visual Studio
#99 Generate Web Services Code
HACK
You can also call any Visual Studio commands from this window by simply
prefacing the command with an exclamation point. Figure 13-20 shows how
using an exclamation point shows the command window IntelliSense.
For instance, you could enter the following command into the VSCMDShell
window:
>!File.OpenFile Class1.cs
This would call the OpenFile command and open Class1.cs in the develop-
ment environment. For a list of helpful command window commands,
please refer to “Master the Command Window”
[Hack #46].
HACK
#99
Generate Web Services Code Hack #99
If you’re a fan of contract-driven development, you can take control of the
WSDL chicken-egg situation.
The .NET Framework makes it extremely easy to create and deploy Web
Services; on top of that, Visual Studio makes it even easier still. You can add
an .asmx file to your project, add a couple of methods, then build your solu-
tion, and you have just written a Web Service. This process is deceptively
simple though, since a lot of things are going on in the background, includ-
ing the generation of a WSDL on the server side and a client proxy on the
client side. Visual Studio quietly handles all of this for you, which is not
Figure 13-19. VSCMDShell Window
Figure 13-20. Command window IntelliSense