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 K2.net 2003 Studio application.

When opening K2.net 2003 Studio, an exception “System.NullReferenceException” may be displayed. It will cause K2.net 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 K2.net 2003 Studio in the Windows Registry: This may occur after upgrading your K2.net 2003 installation. To resolve this issue, follow the Manual or VBScript steps described in this document:

  2)

 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 K2.net 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 K2.net 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. K2.net 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 “K2.net Studio” Registry Key exists for each user on the local machine. If more than one person uses K2.net 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/K2.net Studio” Key.
  2) Right-click the K2.net Studio Key and select “Delete”
 
  
VBScript Method:
  1) Download the attached VBScript.
  2) Extract the VBScript file (“Deleting the K2.net 2003 Studio settings registry key.vbs”) to a location on your machine
  3) Double-click the script file to delete the K2.net 2003 Studio Registry Entries Re open K2.net Studio again.