MSBuild Error MSB4036: The "CreateProperty" task was not found

  • 22 June 2010
  • 3 replies
  • 10 views

Badge +1

I've several environment to deploy as below


1. Development


2. Test


3. QA


4. Production


I follow article http://help.k2.com/en/kb000188.aspx to create deployment package using Environment library (which have 4 Environment as above). My problem is my deployment package work well on bot development and test environment but have error when deploy to QA environment (out put of running MSBuild in QA server is below)


Do you have any idea about this? And thanks for your help


P.S. In this package have only one SmartObject that connect to ADServices2


c:ApplicationPIPOSmartObject Deployment>msbuild PIPO.SmartObject.msbuild /p:E
nvironment=QA
Microsoft (R) Build Engine Version 2.0.50727.4016
[Microsoft .NET Framework, Version 2.0.50727.4016]
Copyright (C) Microsoft Corporation 2005. All rights reserved.


Build started 6/22/2010 5:14:08 PM.
__________________________________________________
Project "c:ApplicationPIPOSmartObject DeploymentPIPO.SmartObject.msbuild" (d
efault targets):


Target Deploy SmartObjects and Associations:
    __________________________________________________
    Project "c:ApplicationPIPOSmartObject DeploymentPIPO.SmartObject.msbuild
" is building "c:ApplicationPIPOSmartObject DeploymentPIPO.SmartObject.msbui
ld" (InitDeploy target(s)):


    Target InitDeploy:
      MSBUILD : warning MSB4010: The "*.tasks" files could not be successfully l
oaded from their expected location "c:ApplicationPIPOSmartObject Deployment".
 Default tasks will not be available.
      c:ApplicationPIPOSmartObject DeploymentProjectDeployment.targets(9,5):
 error MSB4036: The "CreateProperty" task was not found. Check the following: 1.
) The name of the task in the project file is the same as the name of the task c
lass. 2.) The task class is "public" and implements the Microsoft.Build.Framewor
k.ITask interface. 3.) The task is correctly declared with <UsingTask> in the pr
oject file, or in the *.tasks files located in the "c:ApplicationPIPOSmartObj
ect Deployment" directory.
    Done building target "InitDeploy" in project "PIPO.SmartObject.msbuild" -- F
AILED.


    Done building project "PIPO.SmartObject.msbuild" -- FAILED.


    6/22/2010 5:14:09 PM:  ===============      Deploy smartobjects and associat
ions: Task started      ===============


    6/22/2010 5:14:09 PM:  Creating connection on K2QESH-T.PTTCHEM.COM : 5555 ..
.
    6/22/2010 5:14:10 PM:  Connected


    6/22/2010 5:14:13 PM:  ===============      Smartobjects deployed:  ========
=======


    CustomerUser


    6/22/2010 5:14:13 PM:  ===============      Deploy smartobjects and associat
ions: Task completed    ===============



Build succeeded.
MSBUILD : warning MSB4010: The "*.tasks" files could not be successfully loaded
from their expected location "c:ApplicationPIPOSmartObject Deployment". Defau
lt tasks will not be available.
c:ApplicationPIPOSmartObject DeploymentProjectDeployment.targets(9,5): error
 MSB4036: The "CreateProperty" task was not found. Check the following: 1.) The
name of the task in the project file is the same as the name of the task class.
2.) The task class is "public" and implements the Microsoft.Build.Framework.ITas
k interface. 3.) The task is correctly declared with <UsingTask> in the project
file, or in the *.tasks files located in the "c:ApplicationPIPOSmartObject De
ployment" directory.
    1 Warning(s)
    1 Error(s)


Time Elapsed 00:00:04.32


c:ApplicationPIPOSmartObject Deployment>^A^A


3 replies

Badge +10

Hi,


From the error messages it seems as though there are some files missing from one of the folders.


Ensure that you copy all the files in the Deployment folder to the new environment and then try again.


If this does not work let us know.

Badge +1

Thanks for your suggestion JohanL. I'll try that out.

Badge +1

I found the worked solution from K2 support. Detail as below


Hi K. Pattarawat,

We were able to deploy the deploy package you provided in our our environment without problem, so the original package seems to be OK.

Can you check the following:
1. Can you verify that the service pack versions of the .NET Framework 2.0 used in the 2 environments are in sync?
2. Can you verify that the Microsoft.Common.Tasks file exists in C:WINDOWSMicrosoft.NETFrameworkv2.0.50727 on the server you are deploying from.
3. If it exists, can you try to copy this file into the deployment package location (same folder as the PIPO.SmartObject.msbuild file) and see if that helps.
4. If deploy still fails, can you enable verbose logging for the MSBuild command, redeploy and send us the detailed message? you can do that by adding the /verbosity:diag switch after the command, i.e.
msbuild PIPO.SmartObject.msbuild /p:Environment=QA /verbosity:diag


After I suggest my customer to do these step, it's work!!! Because this QA server didn't install any visual studio tools so when user using command line the path for command line is not point to .NET folder. So my customer do the 3rd step and this is clear.

Reply