Wednesday, August 08, 2007

Restore a Missing LinqDataSource Control to Your Toolbox and Data Source Wizard

I have two conventional (DVD) VS 2008 Team System Beta 2 installations on two relatively recent computers. One is installed in its own partition on a Dell server running Windows Vista Ultimate. The other runs under a Virtual Server 2005 R2 SP1 VM on a Gateway dual-core client that uses Windows Server 2003 R2 SP1 as the host OS and Windows Vista Ultimate as the guest OS. The Gateway has 4 GB RAM with 1 GB devoted to the Vista VM.

When I moved my day-to-day development from the Dell Server to the VM, I was surprised to find the ASP.NET LinqDataSource control missing from the Configure Data Source Wizard's first dialog. I checked the Toolbox's Data section and found it missing there, too. So I right-clicked the Toolbox and choose Reset from the context menu, expecting that to materialize the missing control in both locations. No luck.

I searched on LinqDataControl missing and found a hit in a comment to Scott Guthrie's LINQ to SQL (Part 5 - Binding UI using the ASP:LinqDataSource Control) post by Greg McCarty dated today (August 8, 2007):

Beta2 doesn't seem to have the LinqDataSource control in any toolbox? What am I missing?

and an earlier comment of July 29, 2007 by Steve to Scott's July 26, 2007 VS 2008 and .NET 3.5 Beta 2 Released post:

LinqDataSource was missing from Toolbox after install but was available via intellisence. I got it into the Toolbox by Resetting the Toolbox.

It's clear that others were having the problem, too, but Steve's solution didn't work for me.

Finally, I right-clicked the the Toolbox and clicked Choose Items to open the Choose Toolbox Items dialog. Sure enough, the LinqDataSource checkbox was empty:

Click image for full-size capture from Windows Live SkyDrive Beta.

I had not made any modifications to the Toolbox, so the LinqDataSource checkbox must have been empty after Setup completed. Both machines had been running Orcas June 2007 CTP, which I removed and then ran devenv /reset on both machines before starting VS 2008, as recommended by Scott Guthrie (see comments).

Scott Guthrie provides a clue why some installs might have missing LinqDataSource controls in the Toolbox and Wizard, but it doesn't apply to my case. In addition, selecting Reset from the Toolbox's context menu should have added the LinqDataSource. It did for Steve, but not for me. Any ideas?

Update 8/9/2007: Response to Scott Guthrie's comment re devenv /reset.

3 comments:

  1. I suspect the problem is that you haven't run devenv /resetsettings like I suggested in my blog post.

    If you have installed a previous Beta or CTP of Orcas, the toolbox settings are cached - and these earlier versions didn't have the LinqDataSource control.

    Hope this helps,

    Scott

    ReplyDelete
  2. Hi, Scott,

    Thanks for the suggestion, but I had run devenv /reset per your post on both machines. VS 2008 behaved as if the cache was cleared (i.e., started from a clean slate).

    Post updated.

    --rj

    ReplyDelete