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

You are unable to deploy your SmartForm using the K2 Package and Deployment tool due to a "Method not found" error:

Image

Symptoms

An example of the full error message shown in the Deployment logs is as follows:

"PackTest" package deployed 1/31/2019 3:48:02 AM
User Account: Domain\User
Fail TESTDEPLOY

Method not found: 'Void SourceCode.Forms.Design.DefinitionUtility.Merge(SourceCode.Hosting.Client.BaseAPI.BaseAPIConnection, SourceCode.Forms.Design.Merging.IMergeInfoProvider, SourceCode.Forms.Authoring.View, SourceCode.Forms.Authoring.View, SourceCode.Forms.Design.Merging.MergeContext)'. System.MissingMethodException: Method not found: 'Void SourceCode.Forms.Design.DefinitionUtility.Merge(SourceCode.Hosting.Client.BaseAPI.BaseAPIConnection, SourceCode.Forms.Design.Merging.IMergeInfoProvider, SourceCode.Forms.Authoring.View, SourceCode.Forms.Authoring.View, SourceCode.Forms.Design.Merging.MergeContext)'.
at SourceCode.Runtime.Services.Forms.MergeProvider.MergeAuthoringInstances(IMergeInfoProvider mergeProvider, IBaseNamedObject source, IBaseNamedObject target, ComplexType complexType)
at SourceCode.Runtime.Services.Forms.MergeProvider.Merge(ComplexType complexType, IBaseNamedObject instance)
at SourceCode.Runtime.Services.Forms.MergeProvider.Merge(ComplexType complexType)
at SourceCode.Runtime.Services.Forms.Services.BaseFormViewService`3.Deploy(IDeploymentContext context) 00:00:00.0403547


Success Form 00:00:00.0648798
Success test 00:00:00.0156003
Total Duration: 00:00:00.1208348

Troubleshooting Steps

Please compare the version of the assembly "SourceCode.Forms.Design.dll" in the locations below and in your Global Assembly Cache (C:\Windows\assembly\GAC_MSIL). 

[InstallDrive]:\Program Files (x86)\K2 blackpearl\Host Server\Bin
[InstallDrive]:\Program Files (x86)\K2 blackpearl\Bin

If the assembly version in GAC does not match up, please replace the assembly with the one in either of the above-mentioned locations.

Kindly stop K2 Service first before replacing any assemblies. 

The assemblies' version can be viewed when you right-click on the file, choose Properties and select the Details tab as per below:

Image