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

We had some updates which were forced down to our client stations and now are getting Visual Studio error 'Workflowpackage did not load correctly when loading visual studio. I'm assuming this is tied to a specific update. 

activitylog.xml entry showing version error:

  <entry>
    <record>36</record>
    <time>2017/05/23 20:53:18.415</time>
    <type>Error</type>
    <source>VisualStudio</source>
    <description>End package load [WorkflowPackage]</description>
    <guid>{AB85DF7A-EE9A-42CB-877E-E96781A6E60E}</guid>
    <hr>80131509</hr>
    <errorinfo>The tools version "4.6" is unrecognized. Available tools versions are "2.0", "3.5", "4.0".</errorinfo>
  </entry>

Symptoms

The following error appears when opening any K2 project:

 The 'Workflowpackage' did not load correctly.

 

Resolution

This is a known issue specific to K2 blackpearl 4.6.11 and Visual Studio 2012

Manually registering the missing assembly "SourceCode.VisualStudio.dll" to the GAC.

1. Open command prompt

2. Change direct to where the gacutil.exe is

    1. Example

    2. "Cd C:\Program Files (x86)\Microsoft SDKs\Windows\v8.1A\bin\NETFX 4.5.1 Tools\x64"

3. Run the following command:

4. gacutil.exe /if "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\K2\SourceCode.VisualStudio.dll"

Now restart visual studio and the error dissappears.