tfs - Error MSB4184 Microsoft.LightSwitch.Publish.targets when Building project using Team Foundation Build -


company work need implement continous integration. projects developed using lightswitch visual studio 2012. use team foundation server manage source version. created build definition , agent pool try run build processes programatically using msbuild task tfs.

everything goes fine except build solution step throws error. following trace:

2016-08-08t17:30:17.1606552z checking if artifacts directory exists: c:\tfsagent\_work\1\a 2016-08-08t17:30:17.1606552z deleting artifacts directory. 2016-08-08t17:30:17.1606552z creating artifacts directory. 2016-08-08t17:30:17.1762560z checking if test results directory exists: c:\tfsagent\_work\1\testresults 2016-08-08t17:30:17.1762560z deleting test results directory. 2016-08-08t17:30:17.1762560z creating test results directory. 2016-08-08t17:30:17.2230568z starting: sources 2016-08-08t17:30:17.2386617z entering tfvcsourceprovider.preparerepositoryasync 2016-08-08t17:30:17.2386617z localpath=c:\tfsagent\_work\1\s 2016-08-08t17:30:17.2386617z clean=false 2016-08-08t17:30:17.2386617z sourceversion=199 2016-08-08t17:30:17.2386617z mappingjson={"mappings":[{"serverpath":"$/omnipay","mappingtype":"map","localpath":"\\"},{"serverpath":"$/omnipay/drops","mappingtype":"cloak","localpath":"\\"}]} 2016-08-08t17:30:17.2386617z syncing repository: omnipay (tfvc) 2016-08-08t17:30:17.2386617z workspacename=ws_1_3 2016-08-08t17:30:21.4039019z workspace name: ws_1_3;45d6157a-c0a3-480c-9615-310b82a07e0e 2016-08-08t17:30:21.5130997z tf /version:199 2016-08-08t17:30:22.6987201z done syncing repository omnipay version 199 (workspace version c199) 2016-08-08t17:30:22.6987201z leaving tfvcsourceprovider.preparerepositoryasync 2016-08-08t17:30:22.9015180z running tasks 2016-08-08t17:30:22.9327171z starting task: build solution $/omnipay/0-development/omnimerchant/omnimerchant.sln 2016-08-08t17:30:22.9951206z c:\windows\system32\windowspowershell\v1.0\powershell.exe -nologo -sta -noprofile -noninteractive -executionpolicy unrestricted -command ". ([scriptblock]::create('if (!$pshome) { $null = get-item -literalpath ''variable:pshome'' } else { import-module -name ([system.io.path]::combine($pshome, ''modules\microsoft.powershell.management\microsoft.powershell.management.psd1'')) ; import-module -name ([system.io.path]::combine($pshome, ''modules\microsoft.powershell.utility\microsoft.powershell.utility.psd1'')) }')) 2>&1 | foreach-object { write-verbose $_.exception.message -verbose } ; $env:tf_build = 'true' ; import-module -name 'c:\tfsagent\tasks\vsbuild\1.0.37\ps_modules\vststasksdk\vststasksdk.psd1' -argumentlist @{ noninteractive = $true } -erroraction stop ; $verbosepreference = 'silentlycontinue' ; $debugpreference = 'silentlycontinue' ; invoke-vststaskscript -scriptblock ([scriptblock]::create('. ''c:\tfsagent\tasks\vsbuild\1.0.37\vsbuild.ps1'''))" 2016-08-08t17:30:24.8203363z ##[warning]visual studio version '11.0' not found. looking latest version. 2016-08-08t17:30:25.1947427z ##[command]"c:\windows\microsoft.net\framework\v4.0.30319\msbuild.exe" "c:\tfsagent\_work\1\s\0-development\omnimerchant\omnimerchant.sln" /nologo /nr:false /fl /flp:"logfile=c:\tfsagent\_work\1\s\0-development\omnimerchant\omnimerchant.sln.log" /dl:centrallogger,"c:\tfsagent\tasks\vsbuild\1.0.37\ps_modules\msbuildhelpers\microsoft.teamfoundation.distributedtask.msbuild.logger.dll"*forwardinglogger,"c:\tfsagent\tasks\vsbuild\1.0.37\ps_modules\msbuildhelpers\microsoft.teamfoundation.distributedtask.msbuild.logger.dll"  /p:platform="any cpu" /p:configuration="release" /p:visualstudioversion="10.0" 2016-08-08t17:30:25.3195436z los proyectos de esta solución se van compilar de uno en uno. para habilitar la compilación en paralelo, agregue el modificador "/m". 2016-08-08t17:30:25.3351434z compilación iniciada las 08/08/2016 12:30:25 p. m.. 2016-08-08t17:30:25.5223466z proyecto "c:\tfsagent\_work\1\s\0-development\omnimerchant\omnimerchant.sln" en nodo 1 (destinos predeterminados). 2016-08-08t17:30:25.5223466z validatesolutionconfiguration: 2016-08-08t17:30:25.5223466z   compilando la configuración de soluciones "release|any cpu". 2016-08-08t17:30:25.7719622z ##[error]c:\program files (x86)\msbuild\microsoft\visualstudio\lightswitch\v3.0\publish\v1.8\microsoft.lightswitch.publish.targets(31,9): error msb4184: la expresión "[system.io.path]::combine(null, bin\x86)" no se puede evaluar. el valor no puede ser nulo. nombre del parámetro: path1 2016-08-08t17:30:25.7719622z el proyecto "c:\tfsagent\_work\1\s\0-development\omnimerchant\omnimerchant.sln" (1) está compilando "c:\tfsagent\_work\1\s\0-development\omnimerchant\omnimerchant.ls3proj" (2) en el nodo 1 (destinos predeterminados). 2016-08-08t17:30:25.7719622z c:\program files (x86)\msbuild\microsoft\visualstudio\lightswitch\v3.0\publish\v1.8\microsoft.lightswitch.publish.targets(31,9): error msb4184: la expresión "[system.io.path]::combine(null, bin\x86)" no se puede evaluar. el valor no puede ser nulo. nombre del parámetro: path1 [c:\tfsagent\_work\1\s\0-development\omnimerchant\omnimerchant.ls3proj] 2016-08-08t17:30:25.8031476z compilación del proyecto terminada "c:\tfsagent\_work\1\s\0-development\omnimerchant\omnimerchant.ls3proj" (destinos predeterminados) -- error. 2016-08-08t17:30:25.8499500z compilación del proyecto terminada "c:\tfsagent\_work\1\s\0-development\omnimerchant\omnimerchant.sln" (destinos predeterminados) -- error. 2016-08-08t17:30:25.8499500z error al compilar. 2016-08-08t17:30:25.8499500z "c:\tfsagent\_work\1\s\0-development\omnimerchant\omnimerchant.sln" (destino predeterminado) (1) -> 2016-08-08t17:30:25.8499500z "c:\tfsagent\_work\1\s\0-development\omnimerchant\omnimerchant.ls3proj" (destino predeterminado) (2) -> 2016-08-08t17:30:25.8499500z   c:\program files (x86)\msbuild\microsoft\visualstudio\lightswitch\v3.0\publish\v1.8\microsoft.lightswitch.publish.targets(31,9): error msb4184: la expresión "[system.io.path]::combine(null, bin\x86)" no se puede evaluar. el valor no puede ser nulo. nombre del parámetro: path1 [c:\tfsagent\_work\1\s\0-development\omnimerchant\omnimerchant.ls3proj] 2016-08-08t17:30:25.8499500z     0 advertencia(s) 2016-08-08t17:30:25.8499500z     1 errores 2016-08-08t17:30:25.8499500z tiempo transcurrido 00:00:00.29 2016-08-08t17:30:26.0371525z ##[error]process 'msbuild.exe' exited code '1'. 2016-08-08t17:30:26.1307517z finishing task: vsbuild 2016-08-08t17:30:26.1307517z starting task: copy files to: $(build.artifactstagingdirectory) 2016-08-08t17:30:26.1463517z set workingfolder default: c:\tfsagent\tasks\copyfiles\1.0.20 2016-08-08t17:30:26.4583580z ##[debug]agent.workfolder=c:\tfsagent\_work 2016-08-08t17:30:26.4583580z ##[debug]loading inputs , endpoints 2016-08-08t17:30:26.4583580z ##[debug]loading endpoint_auth_$/ 2016-08-08t17:30:26.4583580z ##[debug]loading endpoint_auth_parameter_$/_accesstoken 2016-08-08t17:30:26.4583580z ##[debug]loading endpoint_auth_parameter_systemvssconnection_accesstoken 2016-08-08t17:30:26.4583580z ##[debug]loading endpoint_auth_scheme_$/ 2016-08-08t17:30:26.4583580z ##[debug]loading endpoint_auth_scheme_systemvssconnection 2016-08-08t17:30:26.4583580z ##[debug]loading endpoint_auth_systemvssconnection 2016-08-08t17:30:26.4583580z ##[debug]loading input_cleantargetfolder 2016-08-08t17:30:26.4583580z ##[debug]loading input_contents 2016-08-08t17:30:26.4583580z ##[debug]loading input_overwrite 2016-08-08t17:30:26.4583580z ##[debug]loading input_sourcefolder 2016-08-08t17:30:26.4583580z ##[debug]loading input_targetfolder 2016-08-08t17:30:26.4583580z ##[debug]loaded 11 2016-08-08t17:30:26.4583580z ##[debug]check path : c:\tfsagent\tasks\copyfiles\1.0.20\task.json 2016-08-08t17:30:26.4583580z ##[debug]set resource file to: c:\tfsagent\tasks\copyfiles\1.0.20\task.json 2016-08-08t17:30:26.4739560z ##[debug]system.culture=en-us 2016-08-08t17:30:26.4739560z ##[debug]contents=**\bin\release\** 2016-08-08t17:30:26.4739560z ##[debug]sourcefolder=c:\tfsagent\_work\1\s 2016-08-08t17:30:26.4739560z ##[debug]check path : c:\tfsagent\_work\1\s 2016-08-08t17:30:26.4739560z ##[debug]targetfolder=c:\tfsagent\_work\1\a 2016-08-08t17:30:26.4739560z ##[debug]cleantargetfolder=false 2016-08-08t17:30:26.4739560z ##[debug]overwrite=false 2016-08-08t17:30:26.4739560z ##[debug]include content pattern: **\bin\release\** 2016-08-08t17:30:26.7547577z ##[debug]find c:\tfsagent\_work\1\s 2016-08-08t17:30:26.7547577z ##[debug]2219 matches. 2016-08-08t17:30:26.8795588z ##[debug]allfiles contains 2012 files 2016-08-08t17:30:26.8795588z ##[debug]include matching c:\tfsagent\_work\1\s\**\bin\release\** 2016-08-08t17:30:26.9107601z ##[debug]include matched 0 files 2016-08-08t17:30:26.9107601z found 0 files 2016-08-08t17:30:26.9263593z finishing task: copyfiles 2016-08-08t17:30:26.9419655z starting task: publish artifact: drop 2016-08-08t17:30:26.9419655z set workingfolder default: c:\tfsagent\tasks\publishbuildartifacts\1.0.34 2016-08-08t17:30:27.2383627z ##[debug]agent.workfolder=c:\tfsagent\_work 2016-08-08t17:30:27.2383627z ##[debug]loading inputs , endpoints 2016-08-08t17:30:27.2383627z ##[debug]loading endpoint_auth_$/ 2016-08-08t17:30:27.2383627z ##[debug]loading endpoint_auth_parameter_$/_accesstoken 2016-08-08t17:30:27.2539635z ##[debug]loading endpoint_auth_parameter_systemvssconnection_accesstoken 2016-08-08t17:30:27.2539635z ##[debug]loading endpoint_auth_scheme_$/ 2016-08-08t17:30:27.2539635z ##[debug]loading endpoint_auth_scheme_systemvssconnection 2016-08-08t17:30:27.2539635z ##[debug]loading endpoint_auth_systemvssconnection 2016-08-08t17:30:27.2539635z ##[debug]loading input_artifactname 2016-08-08t17:30:27.2539635z ##[debug]loading input_artifacttype 2016-08-08t17:30:27.2539635z ##[debug]loading input_pathtopublish 2016-08-08t17:30:27.2539635z ##[debug]loading input_targetpath 2016-08-08t17:30:27.2539635z ##[debug]loaded 10 2016-08-08t17:30:27.2539635z ##[debug]check path : c:\tfsagent\tasks\publishbuildartifacts\1.0.34\task.json 2016-08-08t17:30:27.2539635z ##[debug]set resource file to: c:\tfsagent\tasks\publishbuildartifacts\1.0.34\task.json 2016-08-08t17:30:27.2539635z ##[debug]system.culture=en-us 2016-08-08t17:30:27.2539635z ##[debug]pathtopublish=c:\tfsagent\_work\1\a 2016-08-08t17:30:27.2539635z ##[debug]check path : c:\tfsagent\_work\1\a 2016-08-08t17:30:27.2539635z ##[debug]artifactname=drop 2016-08-08t17:30:27.2539635z ##[debug]artifacttype=container 2016-08-08t17:30:27.2695627z ##[debug]targetpath=\\my\share\merchant\20160808.4 2016-08-08t17:30:28.6267793z max concurrent uploads 2, max creators 1 2016-08-08t17:30:28.7048085z found 0 files upload. 2016-08-08t17:30:28.7203860z created 0 files without uploading content. total files processed 0 2016-08-08t17:30:28.7203860z uploaded artifact 'c:\tfsagent\_work\1\a' container folder 'drop' of build 24. 2016-08-08t17:30:29.6719971z associated artifact 12 build 24 2016-08-08t17:30:29.6875965z finishing task: publishbuildartifacts 2016-08-08t17:30:29.7032002z ##[error]system.exception: task vsbuild failed. caused job fail. @ logs task more details. 2016-08-08t17:30:29.7032002z ##[error]   en microsoft.teamfoundation.distributedtask.worker.jobrunner.run(ijobcontext jobcontext, ijobrequest job, ijobextension jobextension, cancellationtokensource tokensource) 

error in line 29 follows:

2016-08-08t17:30:25.7719622z ##[error]c:\program files (x86)\msbuild\microsoft\visualstudio\lightswitch\v3.0\publish\v1.8\microsoft.lightswitch.publish.targets(31,9): error msb4184: la expresión "[system.io.path]::combine(null, bin\x86)" no se puede evaluar. el valor no puede ser nulo. nombre del parámetro: path1 

in english means: error msb4184: "[system.io.path]::combine(null, bin\x86)" expression cannot evaluated. value cannot null. parameter name: path1

going deep microsoft.lightswitch.publish.targets line 39:

<!--if path sign tool not set, try windows sdk path or framework sdk path --> <_windowssdksigntoolpath  condition="'$(signtoolpath)' == ''">$([system.io.path]::combine('$([msbuild]::getregistryvaluefromview('hkey_local_machine\software\microsoft\windows kits\installed roots', 'kitsroot', null, registryview.registry32, registryview.default))', 'bin\x86'))</_windowssdksigntoolpath> 

compiling project using visual studio 2012 works perfect, error throws tfs build refers omnimerchant.ls3proj in line:

<import project="$(msbuildextensionspath)\microsoft\visualstudio\lightswitch\$(lightswitchversion)\microsoft.lightswitch.targets" /> 

i created hkey_local_machine\software\microsoft\windows kits\installed roots , kitsroot key in server, copied folders , files microsoft\visualstudio\lightswitch server based on developer machine, errors still showing. please, need helps! thanks

i've found answer, patrick-msft helped me lot.

many of errors caused missing correctly framework version , missing solution dependencies.

tfs's building agent searchs msbuild according visual studio's projects configured in build definitions or else latest version. absence of correct version installed on build server made msbuild searched latest installed versión , therefore executed following line microsoft.lightswitch.publish.targets:

<_windowssdksigntoolpath  condition="'$(signtoolpath)' == ''">$([system.io.path]::combine('$([msbuild]::getregistryvaluefromview('hkey_local_machine\software\microsoft\windows kits\installed roots', 'kitsroot', null, registryview.registry32, registryview.default))', 'bin\x86'))</_windowssdksigntoolpath> 

that triggered errors , correct way overcome doing following:

according patrick-msft i've installed visual studio 2012 plus updates, , tools necessary same developing pc tfs build server.

besides of it, necessary put projects dependency assemblies (dll) not checked-in tfs.

now builds green!!


Comments