Symptoms
Our development and stage environments are on different physical servers located on the same domain. They both are using the same version of K2 as documented in the ticket information. This is our first time deploying to the stage server and while the SmartForms, SmartObjects and Service Objects transferred properly we receive an error when attempting to deploy the processes inside of our deployment package using the K2 Package and Deployment tool. Below is the error message.
System.Reflection.TargetInvocationException: The following errors occurred while compiling the process (with framework version 4.0):
Build started 8/11/2015 1:37:21 PM.
Project ""K2 Project Path]" on node 1 (Rebuild target(s)).
CoreClean:
(Rebuild target(s)) -- FAILED.
Build FAILED.
0 Warning(s)
0 Error(s)
Time Elapsed 00:00:04.68 ---> System.Exception: The following errors occurred while compiling the process (with framework version 4.0):
Build started 8/11/2015 1:37:21 PM.
at SourceCode.Runtime.Services.Workflow.IsolatedDeploymentController.ExecuteBuild(String toolsVersion, String projPath)
at SourceCode.Runtime.Services.Workflow.IsolatedDeploymentController.BuildProject(String toolsVersion, String projPath)
at SourceCode.Runtime.Services.Workflow.IsolatedDeploymentController.DeployWorker(Object param)
--- End of inner exception stack trace ---
at SourceCode.Runtime.Services.Workflow.IsolatedDeploymentController.Deploy(Stringg] parts, String kprojDir, String kprojName, String kprxDir, String kprxName, String targetFramework, IEnumerable`1 refs)
at SourceCode.Runtime.Services.Workflow.IsolatedDeploymentController.IsolatedDeploy(Action`1 data, ComplexType ct, IEnumerable`1 refs, String sessionCookie, ISecurityManager securityManager)
at SourceCode.Runtime.Services.Workflow.WorkflowDeploymentService.Deploy(IDeploymentContext context)
at SourceCode.Deployment.Runtime.ServerSession.BeginDeploy()
The K2 process that we are attempting to deploy does have a process reference to a custom C_ library that we have developed. It is brought along as a dependency when we select the process in the new package tool. As with all other artifacts, it claims to be deployed properly. When this custom library is removed from the process and the code is commented out, it does deploy as expected. In addition, I developed a test C_ library and added it as a reference and found that the process still deploys. It seems to be an issue specific to this custom code, however the error message does not indicate anything specific such as an additional reference needed.
Diagnoses
Reviewing the size of the dlls referenced in the package created from Dev environment for this process, we noticed that the size is completely wrong. We tried create a simple process referencing these dlls and the package containing the process does not have the same behavior.
Resolution
Removing and recreating these processes using new process name resolved the issue.