"View Code" option missing in Visual Studio
Issue
After opening workflow in Visual Studio, and right-clicking on an event or activity, the View Code option is missing.
Symptoms
- The K2 for Visual Studio component has already been installed
- In the registry editor, navigate to HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftVisualStudio[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.
- 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:
- Open the registry editor, and navigate to HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftVisualStudio[VS version]Packages{ab85df7a-ee9a-42cb-877e-e96781a6e60e}
- Edit the CodeBase, and change it to where SourceCode.VisualStudio.dll is located. It should be located in the ExtensionsK2 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.0Common7IDEExtensionsK2SourceCode.VisualStudio.dll
- 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 /resetsettings
devenv.exe /setup
Alternatively, try the following in command prompt: