Visual Studio IDE/Productivity
Things that are specific to Visual Studio
- Work on a dummy TFS project that you can delete. Delete the project before you deploy for production.
- Not all the attributes for Work Item layout are documented.
- A Work Item Type defined in more than one project is sort of shared between the two. The definition can be different, but the name is shared. So anything you want to change or remove in one has to be done in the other. See item 1.
- Work items are not easy to delete. It can only be done through the database. See the SQL statements for doing removing work items. I found a GUI tool for this, but ultimately it was executing the SQL statements.
- Work Item Type fields are not easy to modify. Essentially you have to delete it and re-add it. The basic steps are:
- Remove the field(s) from the Work Item Type XML definition (both field and in the layout)
- Re-import the Work Item Type XML so the definition in use no longer contains the field(s)
- Delete the fields using the TFS command line tools. This also deletes any data you had stored for existing work items using your custom type.
- Re-process the cube using the TFS web service
- Update the Work Item XML with the updates you need
- Re-import the Work Item Type XML
Of course, after-the-fact I found a good overview of the custom Work Item process.
We all spend lots of time delving into the technical aspects of our work, but don't forget who we are creating all these wonderful apps for. You need to design your apps to work for the users, not create apps that the users need to work to use.
Required Reading: Four Modes of Seeking Information and How to Design for Them
Now that Vista has gone RTM, lots of us are trying to decide when to upgrade. Here is something I have not seen much mention of:
Visual Studio 2003 is not supported in Vista.
This is going to hold back adoption on my work machine. I'm a consultant, I have to do work on whatever platform the client is using, which unfortunately is VS 2003 sometimes. Is VS 2003 going to be relegated to life in a virtual machine from now on?
I will be presenting sessions at the
Speaking at the Visual Studio 2005 Experience on July 28th. My sessions will be on
Visual Studio 2005 – New Features inside the Microsoft Across America truck. There are still spots available for some of the sessions that day. Sign up before it is too late!
I just learned about a FREE .Net training event being held in Ann Arbor, MI on May 13th, 2006: Day of .Net! Check out the agenda at the site.
It is a one-day event advertised as a One Day Conference on all things .NET by Developers for Developers. Lots of great speakers, starting with Mark Miller of Mondays fame, and lots of great local .Net experts, including great guys like Aydin Akcasu, Nino Benvenuti, Dustin Campbell, Jason Follas, Dave Giard, Charles Stacy Harris III, Darrell Hawley, Jim Holmes, Josh Holmes, John Hopkins, Greg Huber, Paul Kimmel, Alex Lowe, Drew Robbins, Martin Shoemaker, and Bill Wagner.
Thinktecture has released a Visual Studio 2005 compatible version of their free
WSCF tool. WSCF is a Schema-Based Contract-First Web Services code generator. It allows you to design the messages, interfaces and data for contract-first style web services, acting as a replacement for XSD.exe and WSDL.exe. We have been using
XSDObjectGen to do something similarly, but WSCF looks like it is much more flexible. For one thing, it generates collections using generics as List<T> instead of the non-type specific ArrayList that XSDObjectGen creates or the even more simplistic arrays that WSDL.exe creates. If you are using .Net 2.0, this is a great step forward for contract-first tools.
My copy of MSDN magazine arrived last night, and I read the article Practical Tips For Boosting The Performance Of Windows Forms Apps. Good read. Anyway, I was shocked to find out that I have been databinding lists improperly ever since I have been using .Net. I frequently wrote my code like this:
//Bad Code
combobox.DataSource = datatable;
combobox.DisplayMember = "State";
combobox.ValueMember = "Id";
//Good Code
combobox.DisplayMember = "State";
combobox.ValueMember = "Id";
combobox.DataSource = datatable;
Apparenly, order matters very much. In the first example, the combobox binds using the DisplayMember, then rebinds when updated with the ValueMember. In the second example, the binding only happens once.
In our current app, we have two lists that contain thousands of items that need to be bound, so we are binding them during the startup process so the user won't wait when requesting that data. The startup time was reduced by just under 40% by changing the order of the code for binding.
Checking amongst the group of developers I work with, no one knew this trick. I read about it yesterday
here. The feature is called the Clipboard Ring, and it is in both Visual Studio 2005 and 2003. Using Ctrl+Shift+V lets you cycle through the last 10 items you have placed on the clipboard. The command is also found in the Edit Menu in and in the Toolbox in VS2003.
Today we are migrating my project from Whidbey Beta1 to Beta 2 (if you know why this is happening today, go ahead and laugh with us), and our biggest hurdle so far is Typed Datasets.
We used dozens of XSD schemas to create typed datasets. Of course, Beta 2 no longer gives a menu option for creating a typed dataset directly from a schema (see this post in the Fedback Center for Visual Studio). The prospect of converting to the Dataset type of schema was daunting, and moving to the command line for xsd.exe was not going over so well either.
We did discover, however, that you can still generate the dataset using the IDE. In the properties of the XSD file, you can set the custom tool to MSDataSetGenerator. Then you can right-click the XSD file and choose Run Custom Tool. The IDE generates the code for the dataset. Whew!
I tried to install the SharePoint web part templates today and got this error:
"Visual Studio .NET must be installed before you can install the Web Part Templates for Visual Studio .NET."
But of course, Visual Studio is installed. I found two answers to the problem on the Usenet:
Add Missing Registry Keys
Reinstall Visual Studio
Along the way I also discovered that you must either have the Microsoft.SharePoint.dll on your machine or on a share you can access in order for the install to proceed.
At the Great Lakes Area .Net users Group meeting last night, during his excellent ASP.Net tips and trick presentation, Jason Beres let us in on a dirty little trick that Visual Studio plays on VB.Net developers (not C# developers though). By default, the editor hides “advanced” properties and methods in the Intellisense.
This setting can be found in the Options dialog box. Tools Menu -> Options -> Text Editor -> Basic:

By default, Hide Advanced Members is checked. I guess the designers were trying to keep VB.Net “friendly” by hiding the complexity? How many times have you as a developer used the Intellisense to explore the options on an object? If you have, you were being shorted.
After a little consternation, got VBCommenter PowerToy working today. Had a problem after installing that was solved on their message board.
It seems to be very useful, but really slows down compiles (of course I already need more RAM so this doesn't help). Looks like I'll have to let it build XML files separate from regular compiles.
Now I need to get up to speed on XSLT to turn those XML files into something readable for non-techies. My project is getting a new person to help write documentation and I am sure the info I generate with this tool will help her out significantly.
Thanks to Lockergnome, the Nov. 18th edition of their IT Professionals newsletter pointed out these two links:
The latter article explains how and why the technique works, and the former link has all the files you need zipped up and ready to install.
I have tried this out, and it seems to work. The different browsers are definitely behaving differently for me. I tried IE v4.01 and some complex client-side scripts did not work as I expected. I also experienced some wierdness with the Address bar, but all is OK now. This could not come at a better time as the test lab in the next aisle is going away as we are moving to a new location. Kudos again to Lockergnome, I consistently get some gems from their newsletters.