Finding what you need in the Microsoft� Visual Studio� documentation, which has over 200,000 topics, can be a daunting task. The Doc Detective is here to help, utilizing his investigative skills to probe the depths of the documentation.

Can't find what you're looking for? Just ask - if it's in there, I'll find it for you; if it isn't, I'll let you know that as well (and tell you where else you might go to find it).

Have a question for the Doc? Send your questions for future columns to me at

Dear Doc Detective,

My boss is on my case. He says that he has a hard time reading my Visual Basic code because my lines of code are too long, and he wants me to limit them to no more than 60 characters.

I know I can use the “_” line-continuation character to split them up, but 60 characters seems to be an arbitrary length, especially given that we are using a very deep object model. Are there any standards or best practices for line length in VB?

  • Disgruntled in Des Moines

Dear Disgruntled,

Line length is a personal preference, or in your case, your boss's personal preference. You should be happy to know, however, that in most cases line-continuation characters are no longer necessary in Visual Basic 2010.

A new language feature known as implicit line continuation allows you to break a line after a comma, a concatenation or assignment operator, and many other places. For a complete list, see the “Continuing a Statement over Multiple Lines” section of the topic “Statements in Visual Basic”. Hope that makes you “gruntled.”

  • the Doc

Dear Doc Detective,

My customers have a lot of requirements - some of them I suspect are contradictory, and they use inconsistent terminology. What will help me get them into some sort of order?

  • Outnumbered in Ouray

Dear Outnumbered,

It sounds like Unified Modeling Language (UML) is the prescription for your woes. The Ultimate edition of Visual Studio includes a number of new UML tools that can help you model the requirements for your application by creating various types of diagrams. You can then review the diagrams with your customers to ensure consistency. To learn more, see the aptly named topic, “Modeling User Requirements.”

  • Doctor D

Dear Doc Detective,

Help me! I think I might have QWERTY embossed backward on my forehead from banging my head on the keyboard so much. HOW am I supposed to publish my ASP.NET Web application to a live server without getting mired in an awful mishmash of error-prone manual steps?

I found documentation for the Copy Web utility, which is fine for Web sites, but I have assemblies to publish, and a database, and basically it's a little more complicated than just copying some files to the server. The worst thing for me is keeping track of my Web.config files. I am constantly getting the development one and the production one mixed up because I have to manually change file names every time I deploy.

There MUST be a better way to do this, right?

  • Disfigured in Denver

Dear Disfigured,

Since you mentioned assemblies, I assume your Web application is a Visual Studio Web application project rather than a Web site project. If that is true, help is on the way! The ASP.NET team and the IIS team have gotten together to make your life much easier in ASP.NET 4 and Visual Studio 2010.

In the Visual Studio 2010 IDE you can directly create a Web deployment package that has everything needed for deployment, and you can easily import the package into IIS using IIS manager or a command-line process. Alternatively, if you can connect from your development computer to the remote server that you want to deploy to, you can use the new one-click publish feature which performs all of the deployment tasks at the click of a button. And when you need to make small changes, one-click publish will save you time by uploading only the changes when you click the publish button.

For an overview of how the process works, see “ASP.NET Web Application Project Deployment Overview.” If you want to jump right in and get started creating a deployment package, see “How to: Deploy a Web Application Project Using a Web Deployment Package.” And if you want to get started with one-click publish, see “How to: Deploy a Web Application Project Using One-Click Publish and Web Deploy Deployment.”

And saving the best for last - yes, even Web.config deployment is now automated. All you have to do is create a simple XML file that specifies the difference between your test file and your production file, and every time you deploy, you automatically get the right Web.config contents in the right place. Voila, no more embarrassing mistakes! To see how easy it is to do this, take a look at “How to: Transform Web.config When Deploying a Web Application Project.”

Oh, and one more tip… try using a laptop - the keys don't hurt as much when you bang your head on the keyboard!

  • Doc D

Dear Doc Detective,

As our application gets larger and more complex I'm finding it more difficult to test the user interface. Our last release went out with a major UI bug that we didn't catch in time, and I don't want that to happen again.

I know Visual Studio Team System has testing tools - does it provide a way to do automated testing of the UI?

  • Frazzled in Frankfort

Dear Frazzled,

Much as a carpenter learns to measure twice and cut once, a development team needs to write code once and test two hundred times. For anything more than a simple application, automation can make testing much easier - write text code once and run it two hundred times.

The Visual Studio Application Lifecycle Management test tools provide several ways to automate testing of your user interface. You can take an existing manual test case and automate it, record your actions to create an automated test, and much more.

Read all about it in the topic, “Testing the User Interface with Automated UI Tests.”

  • Doc Detective

Doc's Doc Tip of the Day

Sometimes all you need is a little bit of code, and it can be frustrating searching topic after topic and finding that they have no code examples.

MSDN now offers the ability to search for code snippets within the MSDN Library. It's easy to find quick references and example code snippets for specific class definitions, function definitions or function calls - and once you find the result(s) you're looking for, you can create a unique URL to bookmark or send through e-mail.

Check out the MSDN Code Search Preview at

Found a topic in Help that doesn't help? Tell the Visual Studio documentation team about it by clicking on the “Send feedback” link in local Help topics, or the “Click to rate and give feedback” link in online Help.