Wednesday, July 23, 2008

Adding a 'Send to Gac' option to the shortcut menu

When working on assemblies that are deployed to the GAC, copying a new version to the GAC is something you do several times a day.

To speed this process up, having a 'send to gac' option on the context menu of a dll file can be very handy.

Use the following reg file to add the 'send to gac' option to the context menu. Note that also an 'open' option is added without a command specified. This is to have a default (i.e. doubleclick) action to avoid sending a dll to the GAC when you accidentally doubleclick on it.

The path of the gacutil.exe utility may differ. You might prefer to add the location of the gacutil.exe utility to the PATH environment variabele and simply use @="gacutil.exe /i \"%1\"" as the command.

Windows Registry Editor Version 5.00 
[HKEY_CLASSES_ROOT\dllfile\shell]
@="Open"
[HKEY_CLASSES_ROOT\dllfile\shell\Open]
@="&Open"
[HKEY_CLASSES_ROOT\dllfile\shell\Open\command]
@=""
[HKEY_CLASSES_ROOT\dllfile\shell\Send to GAC]
@="Send to &Gac"
[HKEY_CLASSES_ROOT\dllfile\shell\Send to GAC\command]
@="\"C:\\Program Files\\Microsoft SDKs\\Windows\\v6.0A\\Bin\\gacutil.exe\" /i \"%1\""

Thursday, July 10, 2008

Zeta Resource Editor

This is a free, open source utility application that enables you to edit string resources from multiple different resource files together inside one single data grid. See the website here

Friday, May 16, 2008

Troubleshooting VSTO Add-ins

During development By default, if an add-in created with Visual Studio Tools for Office throws an exception, the Office application continues without displaying the exception. Set the debugger to break on all exceptions to see when add-in exceptions are thrown. After deployment VSTO can write all errors that occur during startup to a log file or display each error in a message box. By default, these options are turned off for application-level projects. You can turn the options on by adding and setting environment variables. To display each error in a message box, set the VSTO_SUPPRESSDISPLAYALERTS variable to 0 (zero). You can suppress the messages by setting the variable to 1 (one). To write the errors to a log file, set the VSTO_LOGALERTS variable to 1 (one). Visual Studio Tools for Office creates the log file in the folder that contains the application manifest. The default name is .manifest.log. To stop logging errors, set the variable to 0 (zero).

Thursday, April 17, 2008

Virtual PC and MAC addresses

When you copy a VPC, only copy the VHD images and do no copy and reuse the VMC file. When a VMC is created, VPC generates a MAC address for the virtual ethernet adapter(s), and stores this in the VMC file. If you copy the VMC file, and used networking with your VPC, you will end up with duplicate MAC address within your network.

Monday, January 7, 2008

Connect to the Console using Remote Desktop Connection

Whenever you are using Remote Desktop to manage your server, you will sooner or later run into the problem that the maximum number of connections has been reached (Windows Server 2003 allows 2 RDP connections active). Usually, you'll end up blaming your co-workers for not logging of. Fortunately, RDP allows you to connect directly to the console, instead of using another sessoin. To force RDC to connect to the console start it via the command line (start > run): mstsc /console then select the computer to connect to as normal. Note that connecting to the console session will take over the session from whoever is currently logged in.