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,

I just recently discovered Visual Studio LightSwitch, and it looks to be the perfect tool for a departmental app that I've been asked to build. I'm not bad at VB, and have been writing rather sophisticated macros in VBA in Word for years. I also wrote a database application in Access 1 (and then had to convert it Access 2)-so I've been at it for some time.

However, there seems to be a lot of new syntax using Visual Basic in LightSwitch. Is there is a good source to help me learn this new syntax that you could point me to?

-Wondering in Woodburn

Dear Wondering,

Wonder no more. Most of the code that you will need to write in LightSwitch is fairly simple, so your VBA experience should be more than enough to get you started. In most cases, familiar constructs such as For...Next loops are all that you will need.

Much of the new syntax in Visual Basic is largely unnecessary in LightSwitch-although you may see code examples that use things such as Lambda expressions, there is almost always an easier way to do the same thing.

If you want to learn new syntax, a good place to start is this topic on LINQ syntax: "LINQ (Language-Integrated Query)".

LINQ can be used to extend queries that you create in the designer, similar to writing SQL statements in Access.

-the Doc

Dear Doc Detective,

I use ASP.NET and I've been hearing about something called MVC (model-view-controller?). I'm confused about this-is this the new way to do ASP.NET? What do I have to learn now?

-Baffled in Bandon

Dear Baffled,

Yes, MVC is a new development model that uses a different (some of course would say better) pattern than the ASP.NET you're used to, which uses the Web Forms model. Everything you know and love about the Web Forms model still works fine (better, even, in ASP.NET 4!). MVC is an alternative that separates the code for presentation (UI) and business logic. MVC features are included in ASP.NET 4, and you can also download an MVC package to use with ASP.NET 3.5.

To find out more about MVC, have a look at the topic: "ASP.NET Model View Controller (MVC)". That article provides links to topics about MVC, to tutorials, and to videos and blog entries that can get you started.

-Doctor D

Dear Doc Detective,

I've been experimenting with the LightSwitch Beta recently, trying to hook up an application to a WCF RIA service. I can get it to connect and return data, but only for the method that is marked as IsDefault.

Am I missing something, or is it impossible to return data from other methods in my service?

-Missing in Milwaukee

Dear Missing,

You're not missing anything, but LightSwitch is-or I should say was. There was a limitation in Beta 1 that only returned the default method for a WCF RIA service.

This limitation no longer exists as of Beta 2; you can happily call as many methods as you want. There are, however, some things that you need to be aware of when setting up your service. To learn more about using WCF RIA data sources with LightSwitch, see the topic: “Guidelines for Creating WCF RIA Services for LightSwitch”.

-the Doc

Dear Doc Detective,

What is the trick to debugging WCF services? I wrote a WCF service, made sure debugging is turned on in the web.config file, and I even set includeExceptionDetailInFaults to True. I hooked a WinForm test program up to the service, but it will not debug into the service. What am I missing?

-Lost in Lebanon

Dear Lost,

It kind of depends on where the WCF service is hosted. In your case, I'm assuming that your WinForms project is in the same solution as the web service. If so, hitting F5 is just going to attach the debugger to the WinForms app (also assuming that it's the startup project).

To debug the WCF service, you'll need to select the Debug, Attach to Process menu item, and then select the ASP worker process that is hosting the WCF service. This is described in the not-so-aptly named topic: “Limitations on WCF Debugging”.

On the other hand, if your WCF service is self-hosted, it's even easier. (A self-hosted service is a WCF service that does not run inside IIS, the WCF Service Host, or the ASP.NET Development Server.) In this case, you can just set both the WCF and client projects to be Startup projects using the Multiple Startup Projects option. This is described in the topic: “How to: Debug a Self-Hosted WCF Service”.

-the Doc

Doc's Doc Tip of the Day

Some readers have reported problems viewing local Help in Visual Studio 2010. When attempting to launch Help the following message is displayed: “There is no default browser configured on this machine. Help cannot be displayed until a default browser is installed/configured.”

This typically happens when you installed an alternative Help browser and later uninstalled it, leaving an invalid entry in the registry. You can fix it by locating the registry key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Help\v1.0” and deleting the “HelpViewerProgID” entry.

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.