Question

Deploy Package in Team City

  • 4 December 2020
  • 1 reply
  • 62 views

Badge +1

Hi Everyone,

 

Apology to my question as I am new here. I am trying to automate my package deployment thru team city using msbuild. Everything works fine when I execute it in our K2 Server. But when I run it in our Team City Server this makes me failed.  

 

Do I need to configure or install plugins, runtime or anything in my team city server for this to run?  

Inside Team City server, I’ve tried to run and test this first thru command line.

 

Here’s the exact error.

 

C:\Windows\Microsoft.NET\Framework\v2.0.50727>msbuild "D:\Workspace\Deployment\Debug\Deployment\Workflow.msbuild" /p:TestOnly=True;Environment=Development
Microsoft (R) Build Engine Version 2.0.50727.8007
[Microsoft .NET Framework, Version 2.0.50727.8813]
Copyright (C) Microsoft Corporation 2005. All rights reserved.

Build started 12/3/2020 8:11:05 AM.
__________________________________________________
Project "D:\Workspace\Deployment\Debug\Deployment\Workflow.msbuild" (default targets):

Target Deploy Processes:
    __________________________________________________
    Project "D:\Workspace\Deployment\Debug\Deployment\Workflow.msbuild" is building "D:\Workspace\Deployment\Debug\Deployment\Workflow.msbuild" (InitDeploy target(s)):

    D:\Workspace\Deployment\Debug\Deployment\Workflow.msbuild(508,5):error MSB4018: The "SourceCode.DeploymentTasks.ExportProcessTask" task failed unexpectedly.
    D:\Workspace\Deployment\Debug\Deployment\Workflow.msbuild(508,5):error MSB4018: System.BadImageFormatException: Could not load file or assembly '
SourceCode.HostClientAPI, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d' or one of its dependencies. An attempt was made to load a program with an incorrect format.
    D:\Workspace\Deployment\Debug\Deployment\Workflow.msbuild(508,5):error MSB4018: File name: 'SourceCode.HostClientAPI, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d'
    D:\Workspace\Deployment\Debug\Deployment\Workflow.msbuild(508,5):error MSB4018:    at SourceCode.DeploymentTasks.ExportProcessTask.Execute()
    D:\Workspace\Deployment\Debug\Deployment\Workflow.msbuild(508,5):error MSB4018:    at Microsoft.Build.BuildEngine.TaskEngine.ExecuteTask(Executio
nMode howToExecuteTask, Hashtable projectItemsAvailableToTask, BuildPropertyGroup projectPropertiesAvailableToTask, Boolean& taskClassWasFound)
    D:\Workspace\Deployment\Debug\Deployment\Workflow.msbuild(508,5):error MSB4018:    D:\Workspace\Deployment\Debug\Deployment\Workflow.msbuild(508,5):error MSB4018:
Done building target "Deploy Processes" in project "Workflow.msbuild" -- FAILED.


Done building project "Workflow.msbuild" -- FAILED.

Build FAILED.
D:\Workspace\Deployment\Debug\Deployment\Workflow.msbuild(508,5): error MSB4018: The "SourceCode.DeploymentTasks.ExportProcessTask" task failed unexpectedly.
D:\Workspace\Deployment\Debug\Deployment\Workflow.msbuild(508,5): error MSB4018: System.BadImageFormatException: Could not load file or assembly 'SourceCode.HostClientAPI, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaa
a1b130d' or one of its dependencies. An attempt was made to load a program withan incorrect format.
D:\Workspace\Deployment\Debug\Deployment\Workflow.msbuild(508,5): error MSB4018: File name: 'SourceCode.HostClientAPI, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d'
D:\Workspace\Deployment\Debug\Deployment\Workflow.msbuild(508,5): error MSB4018:    at SourceCode.DeploymentTasks.ExportProcessTask.Execute()
D:\Workspace\Deployment\Debug\Deployment\Workflow.msbuild(508,5): error MSB4018:    at Microsoft.Build.BuildEngine.TaskEngine.ExecuteTask(ExecutionMode howToExecuteTask, Hashtable projectItemsAvailableToTask, BuildPropertyGroup projectPropertiesAvailableToTask, Boolean& taskClassWasFound)
D:\Workspace\Deployment\Debug\Deployment\Workflow.msbuild(508,5): error MSB4018:
D:\Workspace\Deployment\Debug\Deployment\Workflow.msbuild(508,5): error MSB4018:
    0 Warning(s)
    1 Error(s)
 

 

Appreciate your help.

 

Thanks!


1 reply

Badge +1

Looks I found a similar topic. 

 

 

Reply