How to deploy using MSBUILD?


Badge +2

Hi all...


 I've been doing Blackpearl process development in Visual Studio against  a dev server for a while and feel very comfortable with that...I can build and deploy processes no problem using Visual Studio's Deploy tool and K2 deployment wizard.  However, now I need to deploy my process to a production server to which I can NOT connect via visual studio.  So I created a deployment package using Visual Studio and tried to find some basic "how to" instructions on what do do next.  I didn't really find any step by step instructions but what I could piece together resulted in me:



  1. Copying the deployment files to the production server
  2. Using remote desktop to log into the production server
  3. Calling MSBUILD (see below) to deploy.

The MSBUILD gave errors (as below) and I don't have any idea where to go next.  I also don't know MSBUILD and so I don't know if there are any settings that I should have set in Visual Studio, etc prior to creating the deployment package.  My questions are:



  1. What is the process for deploying a process to a production server?

  • Are there any settings in Visual Studio that I should have set?
  • Are there any other steps besides just building a process, creating a deployment package, and running MSBUILD against it on the production box?
  • What am I doing wrong below
  • Is there an article anywhere that clearly describes these steps?

How does MSBUILD know about the K2 server and where to deploy the asseblies (or conversely, how does K2 know what processes exist that belong to it...is it that they are deployed to a particular directory or in the GAC, etc.?)...I need to know this just so I have an engineering grasp of what's going on here

Thank you for your help (and the MSBUILD output is below)


 -alex


---


C:Documents and SettingsanDesktopDeploymentsDeployment>C:WINDOWSMicrosoft
.NETFrameworkv2.0.50727MSBuild.exe "C:Documents and SettingsanDesktopDepl
oymentsDeploymentWF_ClosingBoard2.msbuild" /p:TestOnly=True /p:Environment=Rel
ease
Microsoft (R) Build Engine Version 2.0.50727.1433
[Microsoft .NET Framework, Version 2.0.50727.1433]
Copyright (C) Microsoft Corporation 2005. All rights reserved.


Build started 10/17/2008 7:44:05 PM.
__________________________________________________
Project "C:Documents and SettingsanDesktopDeploymentsDeploymentWF_ClosingB
oard2.msbuild" (default targets):


Target Deploy Processes:
    __________________________________________________
    Project "C:Documents and SettingsanDesktopDeploymentsDeploymentWF_Clos
ingBoard2.msbuild" is building "C:Documents and SettingsanDesktopDeployments
DeploymentWF_ClosingBoard2.msbuild" (InitDeploy target(s)):


    C:Documents and SettingsanDesktopDeploymentsDeploymentWF_ClosingBoard2
.msbuild(73,5): error MSB4018: The "SourceCode.DeploymentTasks.ExportProcessTask
" task failed unexpectedly.
    C:Documents and SettingsanDesktopDeploymentsDeploymentWF_ClosingBoard2
.msbuild(73,5): error MSB4018: System.NullReferenceException: Object reference n
ot set to an instance of an object.
    C:Documents and SettingsanDesktopDeploymentsDeploymentWF_ClosingBoard2
.msbuild(73,5): error MSB4018:    at SourceCode.DeploymentTasks.DeploymentTask.I
nitialize()
    C:Documents and SettingsanDesktopDeploymentsDeploymentWF_ClosingBoard2
.msbuild(73,5): error MSB4018:    at SourceCode.DeploymentTasks.ExportProcessTas
k.Initialize()
    C:Documents and SettingsanDesktopDeploymentsDeploymentWF_ClosingBoard2
.msbuild(73,5): error MSB4018:    at SourceCode.DeploymentTasks.Task.set_BuildEn
gine(IBuildEngine value)
    C:Documents and SettingsanDesktopDeploymentsDeploymentWF_ClosingBoard2
.msbuild(73,5): error MSB4018:    at Microsoft.Build.BuildEngine.TaskEngine.Init
ializeTask(ITask task, ItemBucket bucket)
    C:Documents and SettingsanDesktopDeploymentsDeploymentWF_ClosingBoard2
.msbuild(73,5): error MSB4063: The "SourceCode.DeploymentTasks.ExportProcessTask
" task could not be initialized with its input parameters.
Done building target "Deploy Processes" in project "WF_ClosingBoard2.msbuild" --
 FAILED.


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


Build FAILED.
C:Documents and SettingsanDesktopDeploymentsDeploymentWF_ClosingBoard2.msb
uild(73,5): error MSB4018: The "SourceCode.DeploymentTasks.ExportProcessTask" ta
sk failed unexpectedly.
C:Documents and SettingsanDesktopDeploymentsDeploymentWF_ClosingBoard2.msb
uild(73,5): error MSB4018: System.NullReferenceException: Object reference not s
et to an instance of an object.
C:Documents and SettingsanDesktopDeploymentsDeploymentWF_ClosingBoard2.msb
uild(73,5): error MSB4018:    at SourceCode.DeploymentTasks.DeploymentTask.Initi
alize()
C:Documents and SettingsanDesktopDeploymentsDeploymentWF_ClosingBoard2.msb
uild(73,5): error MSB4018:    at SourceCode.DeploymentTasks.ExportProcessTask.In
itialize()
C:Documents and SettingsanDesktopDeploymentsDeploymentWF_ClosingBoard2.msb
uild(73,5): error MSB4018:    at SourceCode.DeploymentTasks.Task.set_BuildEngine
(IBuildEngine value)
C:Documents and SettingsanDesktopDeploymentsDeploymentWF_ClosingBoard2.msb
uild(73,5): error MSB4018:    at Microsoft.Build.BuildEngine.TaskEngine.Initiali
zeTask(ITask task, ItemBucket bucket)
C:Documents and SettingsanDesktopDeploymentsDeploymentWF_ClosingBoard2.msb
uild(73,5): error MSB4063: The "SourceCode.DeploymentTasks.ExportProcessTask" ta
sk could not be initialized with its input parameters.
    0 Warning(s)
    2 Error(s)


Time Elapsed 00:00:00.10


12 replies

Badge +4

Have you taken a look at this KB article? http://kb.k2workflow.com/articles/kb000188.aspx.


Can you connect to the Production Workspace server from VS?  If not, I wonder if you could set up the appropriate environment template on your TEST server and then switch to that environment before creating the deploy package.  I haven't tried this so I am not sure.

Badge +2

Thank you for your reply.  That article got me a step closer.   However, now I'm getting a different set of errors, telling me that:


Error  1. Failed to load assembly "SourceCode.SmartObjects.Auth
oring, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d".


Why would an authoring library be needed?  Is my deploy package requiring something it shouldn't?  What else could be causing this?


 Here's the complete log:


-----


C:Documents and SettingsanDesktopDeploymentsDeployment>MSBuild.exe "C:Docu
ments and SettingsanDesktopDeploymentsDeploymentWF_ClosingBoard2.msbuild" /
p:TestOnly=True /p:Environment=Production


Microsoft (R) Build Engine Version 2.0.50727.1433
[Microsoft .NET Framework, Version 2.0.50727.1433]
Copyright (C) Microsoft Corporation 2005. All rights reserved.


Build started 10/18/2008 11:10:11 AM.
__________________________________________________
Project "C:Documents and SettingsanDesktopDeploymentsDeploymentWF_ClosingB
oard2.msbuild" (default targets):


Target Deploy Processes:
    __________________________________________________
    Project "C:Documents and SettingsanDesktopDeploymentsDeploymentWF_Clos
ingBoard2.msbuild" is building "C:Documents and SettingsanDesktopDeployments
DeploymentWF_ClosingBoard2.msbuild" (InitDeploy target(s)):


    Deploy Processes: Task Started (10/18/2008 11:10:12 AM)
    Adding Process : WF_ClosingBoard2ClosingBoardApproval
    Testing Completed Successfully.
    Deploy Process: Task Completed (10/18/2008 11:10:12 AM)
Target Create Notifications:
    Notification Service: Task Started (10/18/2008 11:10:12 AM)
                 Server Connection: Try and Open scratchy.cpc.local:5555
                 Server Connection: Connected to scratchy.cpc.local:5555
                 Notification(s):
                         Running in Testing Mode. No updates done to the Worklis
t Item Notification.
                 Server Connection: Try and Close Any Open Connections to scratc
hy.cpc.local:5555
                 Server Connection: Done Closing Any Open Connections to scratch
y.cpc.local:5555


                 Summary:
                         Notifications Added to Worklist:   1
                         Notifications Deleted to Worklist: 0
    Notification Service: Task Completed (10/18/2008 11:10:13 AM)


Target Create Workflow Smart Objects:
    Workflow Service: Task Started (10/18/2008 11:10:13 AM)
                 Server Connection(s):
                         Management Server Connection: Try and Open scratchy.cpc
.local:5555
                         Management Server Connection: Connected to scratchy.cpc
.local:5555
                 Service Instance: Try and Get Service Instance from Guid 12e286
80-3377-4aae-98de-10d80fd728b0
                 Service Instance: Created Service Instance from Guid 12e28680-3
377-4aae-98de-10d80fd728b0
                 Get Existing SmartObjects for Service Item Instance.
                 SmartObject to Create/Update: WF_ClosingBoard2_ClosingBoardAppr
oval
                         Extend Object:
                                 Try and Create Extend Object (Service Instance
Extender Type: Process)
    C:Documents and SettingsanDesktopDeploymentsDeploymentWF_ClosingBoard2
.msbuild(81,5): error : 1. Failed to load assembly "SourceCode.SmartObjects.Auth
oring, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d".
    C:Documents and SettingsanDesktopDeploymentsDeploymentWF_ClosingBoard2
.msbuild(81,5): error :
                 Server Disconnection(s):
                         Management Server Connection: Try and Close Any Open Co
nnections to scratchy.cpc.local:5555
                         Management Server Connection: Done Closing Any Open Con
nections to scratchy.cpc.local:5555


                 Summary:
                         SmartObjects Created:0
    Workflow Service: Task Did Not Completed (10/18/2008 11:10:14 AM)
Done building target "Create Workflow Smart Objects" in project "WF_ClosingBoard
2.msbuild" -- FAILED.


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


Build FAILED.
C:Documents and SettingsanDesktopDeploymentsDeploymentWF_ClosingBoard2.msb
uild(81,5): error : 1. Failed to load assembly "SourceCode.SmartObjects.Authorin
g, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d".
C:Documents and SettingsanDesktopDeploymentsDeploymentWF_ClosingBoard2.msb
uild(81,5): error :
    0 Warning(s)
    1 Error(s)


Time Elapsed 00:00:02.85


C:Documents and SettingsanDesktopDeploymentsDeployment>

Badge +2

Thank you for your reply.  That article got me a step closer.   However, now I'm getting a different set of errors, telling me that:


Error  1. Failed to load assembly "SourceCode.SmartObjects.Auth
oring, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d".


Why would an authoring library be needed?  Is my deploy package requiring something it shouldn't?  What else could be causing this?


 Here's the complete log:


-----


C:Documents and SettingsanDesktopDeploymentsDeployment>MSBuild.exe "C:Docu
ments and SettingsanDesktopDeploymentsDeploymentWF_ClosingBoard2.msbuild" /
p:TestOnly=True /p:Environment=Production


Microsoft (R) Build Engine Version 2.0.50727.1433
[Microsoft .NET Framework, Version 2.0.50727.1433]
Copyright (C) Microsoft Corporation 2005. All rights reserved.


Build started 10/18/2008 11:10:11 AM.
__________________________________________________
Project "C:Documents and SettingsanDesktopDeploymentsDeploymentWF_ClosingB
oard2.msbuild" (default targets):


Target Deploy Processes:
    __________________________________________________
    Project "C:Documents and SettingsanDesktopDeploymentsDeploymentWF_Clos
ingBoard2.msbuild" is building "C:Documents and SettingsanDesktopDeployments
DeploymentWF_ClosingBoard2.msbuild" (InitDeploy target(s)):


    Deploy Processes: Task Started (10/18/2008 11:10:12 AM)
    Adding Process : WF_ClosingBoard2ClosingBoardApproval
    Testing Completed Successfully.
    Deploy Process: Task Completed (10/18/2008 11:10:12 AM)
Target Create Notifications:
    Notification Service: Task Started (10/18/2008 11:10:12 AM)
                 Server Connection: Try and Open scratchy.cpc.local:5555
                 Server Connection: Connected to scratchy.cpc.local:5555
                 Notification(s):
                         Running in Testing Mode. No updates done to the Worklis
t Item Notification.
                 Server Connection: Try and Close Any Open Connections to scratc
hy.cpc.local:5555
                 Server Connection: Done Closing Any Open Connections to scratch
y.cpc.local:5555


                 Summary:
                         Notifications Added to Worklist:   1
                         Notifications Deleted to Worklist: 0
    Notification Service: Task Completed (10/18/2008 11:10:13 AM)


Target Create Workflow Smart Objects:
    Workflow Service: Task Started (10/18/2008 11:10:13 AM)
                 Server Connection(s):
                         Management Server Connection: Try and Open scratchy.cpc
.local:5555
                         Management Server Connection: Connected to scratchy.cpc
.local:5555
                 Service Instance: Try and Get Service Instance from Guid 12e286
80-3377-4aae-98de-10d80fd728b0
                 Service Instance: Created Service Instance from Guid 12e28680-3
377-4aae-98de-10d80fd728b0
                 Get Existing SmartObjects for Service Item Instance.
                 SmartObject to Create/Update: WF_ClosingBoard2_ClosingBoardAppr
oval
                         Extend Object:
                                 Try and Create Extend Object (Service Instance
Extender Type: Process)
    C:Documents and SettingsanDesktopDeploymentsDeploymentWF_ClosingBoard2
.msbuild(81,5): error : 1. Failed to load assembly "SourceCode.SmartObjects.Auth
oring, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d".
    C:Documents and SettingsanDesktopDeploymentsDeploymentWF_ClosingBoard2
.msbuild(81,5): error :
                 Server Disconnection(s):
                         Management Server Connection: Try and Close Any Open Co
nnections to scratchy.cpc.local:5555
                         Management Server Connection: Done Closing Any Open Con
nections to scratchy.cpc.local:5555


                 Summary:
                         SmartObjects Created:0
    Workflow Service: Task Did Not Completed (10/18/2008 11:10:14 AM)
Done building target "Create Workflow Smart Objects" in project "WF_ClosingBoard
2.msbuild" -- FAILED.


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


Build FAILED.
C:Documents and SettingsanDesktopDeploymentsDeploymentWF_ClosingBoard2.msb
uild(81,5): error : 1. Failed to load assembly "SourceCode.SmartObjects.Authorin
g, Version=4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d".
C:Documents and SettingsanDesktopDeploymentsDeploymentWF_ClosingBoard2.msb
uild(81,5): error :
    0 Warning(s)
    1 Error(s)


Time Elapsed 00:00:02.85


C:Documents and SettingsanDesktopDeploymentsDeployment>

Badge +9
To get this working. Under the packages' DeploymentBin folder, register the SourceCode.SmartObjects.Authoring.dll file into the GAC (use ether gacutil.exe -i <dll name> from the command line or drag the dll into C:windowsassembly).  After this, you should be able to build and deploy your package.
Badge

Hi there,


I also had the same problem, and I've tried to follow the tips above but still got the error message.


This is my complete error message:


Microsoft (R) Build Engine Version 2.0.50727.832
[Microsoft .NET Framework, Version 2.0.50727.832]
Copyright (C) Microsoft Corporation 2005. All rights reserved.


Build started 3/2/2009 11:08:53 AM.
__________________________________________________
Project "D:LeaveRequestLeaveReqDeploymentDeploymentLeaveRequest.msbuild" (default targets):


Target Deploy Processes:
    __________________________________________________
    Project "D:LeaveRequestLeaveReqDeploymentDeploymentLeaveRequest.msbuild" is building "D:LeaveRequestLeaveReqDeploymentDeploymentLeaveRequest.msbuild" (InitDeploy target(s)):


    D:LeaveRequestLeaveReqDeploymentDeploymentLeaveRequest.msbuild(67,5): error MSB4018: The "SourceCode.DeploymentTasks.ExportProcessTask" task failed unexpectedly.
    D:LeaveRequestLeaveReqDeploymentDeploymentLeaveRequest.msbuild(67,5): error MSB4018: System.InvalidProgramException: The license key is missing. Please contact Region support for assistance.
    D:LeaveRequestLeaveReqDeploymentDeploymentLeaveRequestt.msbuild(67,5): error MSB4018:    at SourceCode.DeploymentTasks.ExportProcessTask.GetLicensedApp()
    D:LeaveRequestLeaveReqDeploymentDeploymentLeaveRequest.msbuild(67,5): error MSB4018:    at SourceCode.DeploymentTasks.ExportProcessTask.Initialize()
    D:LeaveRequestLeaveReqDeploymentDeploymentLeaveRequest.msbuild(67,5): error MSB4018:    at SourceCode.DeploymentTasks.Task.set_BuildEngine(IBuildEngine value)
    D:LeaveRequestLeaveReqDeploymentDeploymentLeaveRequest.msbuild(67,5): error MSB4018:    at Microsoft.Build.BuildEngine.TaskEngine.InitializeTask(ITask task, ItemBucket bucket)
    D:LeaveRequestLeaveReqDeploymentDeploymentLeaveRequest.msbuild(67,5): error MSB4063: The "SourceCode.DeploymentTasks.ExportProcessTask" task could not be initialized with its input parameters.
Done building target "Deploy Processes" in project "LeaveRequest.msbuild" -- FAILED.


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


Build FAILED.
D:LeaveRequestLeaveReqDeploymentDeploymentLeaveRequest.msbuild(67,5): error MSB4018: The "SourceCode.DeploymentTasks.ExportProcessTask" task failed unexpectedly.
D:LeaveRequestLeaveReqDeploymentDeploymentLeaveRequest.msbuild(67,5): error MSB4018: System.InvalidProgramException: The license key is missing. Please contact Region support for assistance.
D:LeaveRequestLeaveReqDeploymentDeploymentLeaveRequest.msbuild(67,5): error MSB4018:    at SourceCode.DeploymentTasks.ExportProcessTask.GetLicensedApp()
D:LeaveRequestLeaveReqDeploymentDeploymentLeaveRequest.msbuild(67,5): error MSB4018:    at SourceCode.DeploymentTasks.ExportProcessTask.Initialize()
D:LeaveRequestLeaveReqDeploymentDeploymentLeaveRequest.msbuild(67,5): error MSB4018:    at SourceCode.DeploymentTasks.Task.set_BuildEngine(IBuildEngine value)
D:LeaveRequestLeaveReqDeploymentDeploymentLeaveRequest.msbuild(67,5): error MSB4018:    at Microsoft.Build.BuildEngine.TaskEngine.InitializeTask(ITask task, ItemBucket bucket)
D:LeaveRequestLeaveReqDeploymentDeploymentLeaveRequest.msbuild(67,5): error MSB4063: The "SourceCode.DeploymentTasks.ExportProcessTask" task could not be initialized with its input parameters.
    0 Warning(s)
    2 Error(s)


Time Elapsed 00:00:00.10


 


Is this about license key issues?


Please help...


 


Thanks..

Badge +9

Hi Lulu,


This is a known issue at this moment as the export tasks is currently expecting a certain registry key that is installed on the machine with the K2 designer for Visual Studio.


To fix this, use regedit and export the LoadKey value in HKLMSOFTWARESouceCodeStudio


Import it into the machine you are running the msbuild command and then try again.  It should work at this point.


Note that you should backup your registry hive as improper changes to the registry can cause severe issues.

Badge

Hi Johnny,


 


It works.


Although I found another error, but it's only about another missing dll file in that server.


 


Thank you so much with your help.... ;p

Badge +9
No worries.  Glad that got sorted out.
Badge +5

Hi Johny,


I came accross the same problem, I have the K2 Blackpoint evaluation version installed on my machine. I created a deployment package of a K2 project that contains two K2 processes. Now I am using MSBUILD to deploy this package since on the production machine there is no K2 installed. So I just copied the Deployment folder created after creating the Deployment package to the production machine. Then I executed the command as below to test the production environment for deployment,


msbuild "C:Documents and SettingsAdministratorDesktopobjDebugDeploymentLeaveReqInfoK2.msbuild" /p:testonly=true /p:environment=production


I also tried with your solution to import the registry key at HKLMSoftwaresource code, but it gave me the same error.


Can you suggest something


This was the output:
C:WINDOWSMicrosoft.NETFrameworkv2.0.50727>msbuild "C:Documents and Settings
AdministratorDesktopobjDebugDeploymentLeaveReqInfoK2.msbuild" /p:testonly=
true /p:evironment=production
Microsoft (R) Build Engine Version 2.0.50727.1433
[Microsoft .NET Framework, Version 2.0.50727.1433]
Copyright (C) Microsoft Corporation 2005. All rights reserved.


Build started 2/24/2010 4:18:11 PM.
__________________________________________________
Project "C:Documents and SettingsAdministratorDesktopobjDebugDeploymentLe
aveReqInfoK2.msbuild" (default targets):


Target K2 Workflow Integration Process Deployment:
    __________________________________________________
    Project "C:Documents and SettingsAdministratorDesktopobjDebugDeploymen
tLeaveReqInfoK2.msbuild" is building "C:Documents and SettingsAdministratorD
esktopobjDebugDeploymentLeaveReqInfoK2.msbuild" (InitDeploy target(s)):


    C:Documents and SettingsAdministratorDesktopobjDebugDeploymentLeaveRe
qInfoK2.msbuild(70,5): error MSB4018: The "SourceCode.DeploymentTasks.SharePoint
.WorkflowIntegration.WorkflowIntegrationTask" task failed unexpectedly.
    C:Documents and SettingsAdministratorDesktopobjDebugDeploymentLeaveRe
qInfoK2.msbuild(70,5): error MSB4018: System.IO.FileNotFoundException: Could not
 load file or assembly 'SourceCode.Framework, Version=4.0.0.0, Culture=neutral,
PublicKeyToken=16a2c5aaaa1b130d' or one of its dependencies. The system cannot f
ind the file specified.
    C:Documents and SettingsAdministratorDesktopobjDebugDeploymentLeaveRe
qInfoK2.msbuild(70,5): error MSB4018: File name: 'SourceCode.Framework, Version=
4.0.0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d'
    C:Documents and SettingsAdministratorDesktopobjDebugDeploymentLeaveRe
qInfoK2.msbuild(70,5): error MSB4018:    at SourceCode.DeploymentTasks.TaskLogge
r.LogMessage(MessageImportance importance, String message)
    C:Documents and SettingsAdministratorDesktopobjDebugDeploymentLeaveRe
qInfoK2.msbuild(70,5): error MSB4018:    at SourceCode.DeploymentTasks.SharePoin
t.WorkflowIntegration.WorkflowIntegrationTask.Execute()
    C:Documents and SettingsAdministratorDesktopobjDebugDeploymentLeaveRe
qInfoK2.msbuild(70,5): error MSB4018:    at Microsoft.Build.BuildEngine.TaskEngi
ne.ExecuteTask(ExecutionMode howToExecuteTask, Hashtable projectItemsAvailableTo
Task, BuildPropertyGroup projectPropertiesAvailableToTask, Boolean& taskClassWas
Found)
    C:Documents and SettingsAdministratorDesktopobjDebugDeploymentLeaveRe
qInfoK2.msbuild(70,5): error MSB4018:
    C:Documents and SettingsAdministratorDesktopobjDebugDeploymentLeaveRe
qInfoK2.msbuild(70,5): error MSB4018: WRN: Assembly binding logging is turned OF
F.
    C:Documents and SettingsAdministratorDesktopobjDebugDeploymentLeaveRe
qInfoK2.msbuild(70,5): error MSB4018: To enable assembly bind failure logging, s
et the registry value [HKLMSoftwareMicrosoftFusion!EnableLog] (DWORD) to 1.
    C:Documents and SettingsAdministratorDesktopobjDebugDeploymentLeaveRe
qInfoK2.msbuild(70,5): error MSB4018: Note: There is some performance penalty as
sociated with assembly bind failure logging.
    C:Documents and SettingsAdministratorDesktopobjDebugDeploymentLeaveRe
qInfoK2.msbuild(70,5): error MSB4018: To turn this feature off, remove the regis
try value [HKLMSoftwareMicrosoftFusion!EnableLog].
    C:Documents and SettingsAdministratorDesktopobjDebugDeploymentLeaveRe
qInfoK2.msbuild(70,5): error MSB4018:
Done building target "K2 Workflow Integration Process Deployment" in project "Le
aveReqInfoK2.msbuild" -- FAILED.


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


Build FAILED.
C:Documents and SettingsAdministratorDesktopobjDebugDeploymentLeaveReqInf
oK2.msbuild(70,5): error MSB4018: The "SourceCode.DeploymentTasks.SharePoint.Wor
kflowIntegration.WorkflowIntegrationTask" task failed unexpectedly.
C:Documents and SettingsAdministratorDesktopobjDebugDeploymentLeaveReqInf
oK2.msbuild(70,5): error MSB4018: System.IO.FileNotFoundException: Could not loa
d file or assembly 'SourceCode.Framework, Version=4.0.0.0, Culture=neutral, Publ
icKeyToken=16a2c5aaaa1b130d' or one of its dependencies. The system cannot find
the file specified.
C:Documents and SettingsAdministratorDesktopobjDebugDeploymentLeaveReqInf
oK2.msbuild(70,5): error MSB4018: File name: 'SourceCode.Framework, Version=4.0.
0.0, Culture=neutral, PublicKeyToken=16a2c5aaaa1b130d'
C:Documents and SettingsAdministratorDesktopobjDebugDeploymentLeaveReqInf
oK2.msbuild(70,5): error MSB4018:    at SourceCode.DeploymentTasks.TaskLogger.Lo
gMessage(MessageImportance importance, String message)
C:Documents and SettingsAdministratorDesktopobjDebugDeploymentLeaveReqInf
oK2.msbuild(70,5): error MSB4018:    at SourceCode.DeploymentTasks.SharePoint.Wo
rkflowIntegration.WorkflowIntegrationTask.Execute()
C:Documents and SettingsAdministratorDesktopobjDebugDeploymentLeaveReqInf
oK2.msbuild(70,5): error MSB4018:    at Microsoft.Build.BuildEngine.TaskEngine.E
xecuteTask(ExecutionMode howToExecuteTask, Hashtable projectItemsAvailableToTask
, BuildPropertyGroup projectPropertiesAvailableToTask, Boolean& taskClassWasFoun
d)
C:Documents and SettingsAdministratorDesktopobjDebugDeploymentLeaveReqInf
oK2.msbuild(70,5): error MSB4018:
C:Documents and SettingsAdministratorDesktopobjDebugDeploymentLeaveReqInf
oK2.msbuild(70,5): error MSB4018: WRN: Assembly binding logging is turned OFF.
C:Documents and SettingsAdministratorDesktopobjDebugDeploymentLeaveReqInf
oK2.msbuild(70,5): error MSB4018: To enable assembly bind failure logging, set t
he registry value [HKLMSoftwareMicrosoftFusion!EnableLog] (DWORD) to 1.
C:Documents and SettingsAdministratorDesktopobjDebugDeploymentLeaveReqInf
oK2.msbuild(70,5): error MSB4018: Note: There is some performance penalty associ
ated with assembly bind failure logging.
C:Documents and SettingsAdministratorDesktopobjDebugDeploymentLeaveReqInf
oK2.msbuild(70,5): error MSB4018: To turn this feature off, remove the registry
value [HKLMSoftwareMicrosoftFusion!EnableLog].
C:Documents and SettingsAdministratorDesktopobjDebugDeploymentLeaveReqInf
oK2.msbuild(70,5): error MSB4018:
    0 Warning(s)
    1 Error(s)

Badge +8

You can try to add the missing assembly (SourceCode.Framework) to the GAC if you have not done so yet. I have also seen similar errors where installing the C++ Redistributable package on the machine resolved the issues. It was reporting another missing assembly though (SourceCode.HostClientAPI).

Badge +4

Hi johnny,


I got the same error (Export task failed)  for only one process. Rest of the process is working fine. All the projects are in same solution. I have pointed the environment to production before creating deployment package. The same project was working fine until 3 days back.


Only incident I noticed is: recently the visual studio got hang and was not responding. I have forcly closed the studio using task manager.


Could you please throw some light


.....Deployment>C:WindowsMicrosoft.NETFrameworkv2.0.50727MSBuild.exe ...Test.msbuild /p:TestOnly=True /p:Environment="Production"
Microsoft (R) Build Engine Version 2.0.50727.4927
[Microsoft .NET Framework, Version 2.0.50727.4984]
Copyright (C) Microsoft Corporation 2005. All rights reserved.


Build started 22/05/2013 11:02:08.
__________________________________________________
Project ".....msbuild" (default targets):


Target Deploy Processes:
    __________________________________________________
    Project ".....msbuild" is building ".....msbuild" (InitDeploy target(s)):


    ....msbuild(702,5): error MSB4018: The "SourceCode.DeploymentTasks.ExportProcessTask" task failed unexpectedly.
    ....msbuild(702,5): error MSB4018: System.NullReferenceException: Object reference not set to an instance of an object.
    ....msbuild(702,5): error MSB4018:    at SourceCode.DeploymentTasks.DeploymentTask.Initialize()
    .....msbuild(702,5): error MSB4018:    at SourceCode.DeploymentTasks.ExportProcessTask.Initialize()
    .....msbuild(702,5): error MSB4018:    at SourceCode.DeploymentTasks.Task.set_BuildEngine(IBuildEngine value)
    .....msbuild(702,5): error MSB4018:    at Microsoft.Build.BuildEngine.TaskEngine.InitializeTask(ITask task, ItemBucket bucket)
    .....msbuild(702,5): error MSB4063: The "SourceCode.DeploymentTasks.ExportProcessTask" task could not be initialized with its input parameters.
Done building target "Deploy Processes" in project "MasterBookRegister.Workflows.PartCloseBookTest.msbuild" -- FAILED.


Done building project "MasterBookRegister.Workflows.PartCloseBookTest.msbuild" -- FAILED.


Build FAILED.
.....msbuild(702,5): error MSB4018: The "SourceCode.DeploymentTasks.ExportProcessTask" task failed unexpectedly.
.....msbuild(702,5): error MSB4018: System.NullReferenceException: Object reference not set to an instance of an object.
.....msbuild(702,5): error MSB4018:    at SourceCode.DeploymentTasks.DeploymentTask.Initialize()
.....msbuild(702,5): error MSB4018:    at SourceCode.DeploymentTasks.ExportProcessTask.Initialize()
.....msbuild(702,5): error MSB4018:    at SourceCode.DeploymentTasks.Task.set_BuildEngine(IBuildEngine value)
.....msbuild(702,5): error MSB4018:    at Microsoft.Build.BuildEngine.TaskEngine.InitializeTask(ITask task, ItemBucket bucket)
.....msbuild(702,5): error MSB4063: The "SourceCode.DeploymentTasks.ExportProcessTask" task could not be initialized with its input parameters.
    0 Warning(s)
    2 Error(s)


Time Elapsed 00:00:00.20


Thanks


NathanPillai

Badge +4

Interestingly I found the issue and fixed it.


Opened project file in notepad and compared with the working one. I found some missing lines under the propertygroup xml tag. I have no idea whether it vanished due to visual studio crash since I never checked earlier.


I just copy pasted the following lines and it worked.


    <SelectedEnvironment>Dev</SelectedEnvironment>
    <DeploymentLabelName>Nathan Pillai 22/10/2012 16:52:59</DeploymentLabelName>
    <DeploymentLabelDescription>
    </DeploymentLabelDescription>
    <SmartObjectConnectionStringProperty>$Field=SmartObject Server</SmartObjectConnectionStringProperty>
    <WorkflowManagementConnectionStringProperty>$Field=Workflow Management Server</WorkflowManagementConnectionStringProperty>
    <HistoryIsAdvanced>Normal</HistoryIsAdvanced>

Reply