P&D Tool Deployment fails with "Unknown Error"

  • 15 February 2022
  • 0 replies
  • 23 views

Userlevel 5
Badge +20
 

Deploying workflow with P&D results in "Deployment was unsuccessful due to an unknown error."

kbt142181

PRODUCT
K2 Five 5.0 to 5.1
K2 blackpearl 4.6.11 to 4.7
BASED ON
K2 blackpearl 4.7
TAGS
.NET Framework
Deployment
K2 Designer for Visual Studio
K2 Studio
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.
LEGACY/ARCHIVED CONTENT
This article has been archived, and/or refers to legacy products, components or features. The content in this article is offered "as is" and will no longer be updated. Archived content is provided for reference purposes only. This content does not infer that the product, component or feature is supported, or that the product, component or feature will continue to function as described herein.

Issue

If you are developing a workflow using K2 for Visual Studio and include the following kinds of elements:

- References to custom .NET assemblies built for .NET 4.5.2

- The checkbox "Local copy" within the reference window is enabled 
- Data event, IPC event, Server event code consuming the custom .NET assemblies from GAC

Then on a developer machine, you can successfully deploy from Visual Studio and run the workflow with success. You can also package and deploy this package using "K2 Package and Deployment" on the same server.

However, if you try to deploy the same package using "K2 Package and Deployment" on a different development server, you will get an error when deploying the workflow. The error does not contain any detailed information and will only display the following:

Deployment was unsuccessful due to an unknown error.
System.Reflection.TargetInvocationException: The following errors occurred while compiling the process (with framework version 4.5.2):
Deployment was unsuccessful due to an unknown error. ---> System.Exception: The following errors occurred while compiling the process (with framework version 4.5.2):
Deployment was unsuccessful due to an unknown error.
at SourceCode.Runtime.Services.Workflow.IsolatedDeploymentController.HandleDeploymentResults(DeploymentResults results, String error)
at SourceCode.Runtime.Services.Workflow.IsolatedDeploymentController.DeployWorker(Object param)
--- End of inner exception stack trace ---
at SourceCode.Runtime.Services.Workflow.IsolatedDeploymentController.Deploy(String[] 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, ISecurityManager securityManager, IServiceMarshalling serviceMarshalling, IEnvironment environment)
at SourceCode.Runtime.Services.Workflow.WorkflowDeploymentService.Deploy(IDeploymentContext context)
at SourceCode.Deployment.Runtime.ServerSession.AsyncDeploy()"

 

You know that the reason for the workflow failing to deploy is because of the custom reference assemblies, since if you remove them, it deploys successfully.

 

Symptoms

When deploying the same package using "K2 Package and Deployment" on a different development server, the error appears.

Troubleshooting Steps

As a workaround, you can "strong sign" your custom DLL assemblies, this should help with deploying in the future.

 

 

Please also make sure you have pre-deployed all the custom assemblies to the target deployment server, preferably in the GAC.


0 replies

Be the first to reply!

Reply