- Details
I must say that I ignored Trace object and TRACE compilation constant for long time. I've been only using Debug object and DEBUG constant for debugging purposes.
Recently, one user of our VSdocman encountered strange problem which I couldn't reproduce. We all know it. So I created special tracing build for him which logged all important activity, variable values and obviously exceptions. The problem was isolated and fixed in one day.
- Details
We all know that we should use Try ... Catch
instead of On Error...
But our VSdocman contains some code ported from VB6. This code naturally uses On Error...
and it was OK as long as the code worked correctly.
Recently, we decided to clean the old code and use String.equals method for comparing two strings instead of = operator. And suddenly On Error Resume Next wasn't good anymore. If the original method was
- Details
Many people reported that they miss configuration manager drop-down list (Debug/Release) in their VS 2005.
- Details
There's not too much to explain about strongly typed collections. There are many articles describing how to implement them. However, there are not so many add-ins or macros that can generate them automatically for you. I needed these collections in my projects as well so I wrote a macro which asks you for item type, automatically creates class file, adds it to the current project and generates fully documented strongly typed collection. It generates VB code but it can be easily modified to create C# or other language as well.
For example we want a String collection. After invoking the macro we specify the type.
- Details
You already know that you can customize main menu and toolbars and you can place commands or macros on them. Unfortunately you cannot customize context (shortcut, right-click) menu this way in VS .NET 2002 and 2003. You simply cannot invoke context menu in Customize mode. You can do it easily in VS 2005.
For VS 2002/2003 we must use small trick. We create exact copy of context menu in VS main menu, right after the Help menu. This "mirror" menu is fully customizable. After we make changes to this copy, we copy them back to the context menu.
In more detail: