Topic
The following errors present in InstallerTrace log:
12:21:35:>> DeployPackage.DataRecieved: Error: System.Reflection.TargetInvocationException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object.
12:21:35:>> DeployPackage.DataRecieved: at SourceCode.Runtime.Services.Workflow.IsolatedDeploymentController.AddEnvironment(IEnvironmentLibraryService envService, DeploymentPackage package)
12:21:35:>> DeployPackage.DataRecieved: at SourceCode.Runtime.Services.Workflow.IsolatedDeploymentController.DeployWorker(Object param)
12:21:35:>> DeployPackage.DataRecieved: --- End of inner exception stack trace ---
12:21:35:>> DeployPackage.DataRecieved: at SourceCode.Runtime.Services.Workflow.IsolatedDeploymentController.Deploy(String[] parts, String kprojDir, String kprojName, String kprxDir, String kprxName, String targetFramework, IEnumerable`1 refs, String procFolder)
12:21:35:>> DeployPackage.DataRecieved: at SourceCode.Runtime.Services.Workflow.IsolatedDeploymentController.IsolatedDeploy(Action`1 data, ComplexType ct, IEnumerable`1 refs, ISecurityManager securityManager, IServiceMarshalling serviceMarshalling, IEnvironment environment)
12:21:35:>> DeployPackage.DataRecieved: at SourceCode.Runtime.Services.Workflow.WorkflowDeploymentService.Deploy(IDeploymentContext context)
12:21:35:>> DeployPackage.DataRecieved: at SourceCode.Deployment.Runtime.ServerSession.DoDeployment(Boolean deploymentLoggingEnabled, ISessionManager sessionManager, Int32 sessionId, IComparisonResults comparisonResults, DeploymentPlan deploymentPlan, Dictionary`2 collators, Boolean haltOnError, Boolean deploymentInProgress, IDeployOptions deployOptions, Boolean noAnalyze, IServiceProvider serviceProvider, Action`1 expireItemCache, Action`2 setDeploymentProgressCount, Action incrementDeploymentProgress, Stopwatch timer)
12:21:35:>> DeployPackage.DataRecieved: Done!: Done!
Instructions
This error can be caused by missing "Workflow Management Server" Environment Field for the default Environment.
Additional Information
Adding the missing Environment Field in K2 Management > Environment Library > [Default Environment] allows the package to deploy successfully.
