This article was created in response to a support issue logged with K2. The content may include typographical errors and may be revised at any time without notice This article is not considered official documentation for K2 software and is provided “as is” with no warranties.

Issue

After opening workflow in Visual Studio, and right-clicking on an event or activity, the View Code option is missing.

Image

Symptoms

  • The K2 for Visual Studio component has already been installed
  • In the registry editor, navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\[VS version]\Packages\{ab85df7a-ee9a-42cb-877e-e96781a6e60e}, and select the CodeBase. The value in CodeBase is an invalid path. The correct value should be a full path that points to SourceCode.VisualStudio.dll.

    Image
  • Please make sure to replace [VS version] with the version of your Visual Studio. For example:
    Visual Studio 2010 = 10.0
    Visual Studio 2012 = 11.0
    Visual Studio 2013 = 12.0
    Visual Studio 2015 = 14.0

Resolution

If your CodeBase path is wrong:

  1. Open the registry editor, and navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\[VS version]\Packages\{ab85df7a-ee9a-42cb-877e-e96781a6e60e}
  2. Edit the CodeBase, and change it to where SourceCode.VisualStudio.dll is located. It should be located in the Extensions\K2 folder within your Visual Studio installation folder. For example, the default installation path for Visual Studio 2010 is C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\K2\SourceCode.VisualStudio.dll
  3. After that, restart your machine for the registry change to take effect, then open your Visual Studio and try again.

If that still does not help, then you can try resetting your Visual Studio environment. Run the following commands in the Visual Studio Command Prompt: 

devenv.exe /resetuserdata
devenv.exe /resetsettings
devenv.exe /setup

Alternatively, try the following in command prompt:

"C:\Program Files (x86)\Microsoft Visual Studio [VS version]\Common7\IDE\devenv.exe" /setup