This article explains the steps to take in the event of a “System.NullReferenceException has occurred in K2Studio.exe” error message. This can appear when opening the 2003 Studio application.

When opening 2003 Studio, an exception “System.NullReferenceException” may be displayed. It will cause 2003 Studio to close or Windows may attempt to launch a debugger.
There are two known causes for this error:
  1) Incorrect entries related to 2003 Studio in the Windows Registry: This may occur after upgrading your 2003 installation. To resolve this issue, follow the Manual or VBScript steps described in this document:


 Unusable K2Studio.Config file: A corrupt K2Studio.Config file has been known to cause this error (or one very similar). If repairing the registry does not solve this problem (i.e. the solution described in this KB article), you may need to reinstall Studio in order to re-establish a correct K2Studio.Config file.

Important: Incorrectly editing the registry may severely damage your system. Before making changes to the Registry, you should perform a backup.

Note:  Personalized settings and recent solution lists in 2003 Studio will be cleared, as these settings are stored in the registry under the same key that will be deleted. However, the corrupt value may be anywhere in the Registry Key, so deleting the entire Key is the easiest way to resolve the exception. 2003 Studio will recreate the Registry entries when it is opened again.
It is recommended that the attached VBScript file be used to delete the Registry Key. Only use the manual method of editing the Registry if you are experienced in doing so.

The “ Studio” Registry Key exists for each user on the local machine. If more than one person uses 2003 Studio on the machine, you will need to run the VBScript file or edit the registry while logged in as each of the users on the machine.

Manual Method:
  1) Using RegEdit, browse to the “HKEY_CURRENT_USER/Software/SourceCode/ Studio” Key.
  2) Right-click the Studio Key and select “Delete”
VBScript Method:
  1) Download the attached VBScript.
  2) Extract the VBScript file (“Deleting the 2003 Studio settings registry key.vbs”) to a location on your machine
  3) Double-click the script file to delete the 2003 Studio Registry Entries Re open Studio again.