Getting error "This version of msbuild is not supported: 'Microsoft.Build, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'" while building a solution from TFS Build Hub


i have created build definition on on-premises tfs 2015, , trying build simple web application. getting below error:

this version of msbuild not supported: 'microsoft.build, version=15.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a'

below id complete log build task.

  1. 2016-08-11t10:01:47.2275152z checking if artifacts directory exists: c:\agent\_work\1\a
  2. 2016-08-11t10:01:47.2275152z deleting artifacts directory.
  3. 2016-08-11t10:01:47.2431185z creating artifacts directory.
  4. 2016-08-11t10:01:47.2431185z checking if test results directory exists: c:\agent\_work\1\testresults
  5. 2016-08-11t10:01:47.2431185z deleting test results directory.
  6. 2016-08-11t10:01:47.2431185z creating test results directory.
  7. 2016-08-11t10:01:47.2900162z starting: sources
  8. 2016-08-11t10:01:47.3056189z entering tfvcsourceprovider.preparerepositoryasync
  9. 2016-08-11t10:01:47.3056189z localpath=c:\agent\_work\1\s
  10. 2016-08-11t10:01:47.3056189z clean=false
  11. 2016-08-11t10:01:47.3056189z sourceversion=5
  12. 2016-08-11t10:01:47.3056189z mappingjson={"mappings":[{"serverpath":"$/cmmitestproject","mappingtype":"map","localpath":"\\"},{"serverpath":"$/cmmitestproject/drops","mappingtype":"cloak","localpath":"\\"}]}
  13. 2016-08-11t10:01:47.3056189z syncing repository: cmmitestproject (tfvc)
  14. 2016-08-11t10:01:47.3056189z workspacename=ws_1_3
  15. 2016-08-11t10:01:48.5243771z workspace name: ws_1_3;build\d284e121-0ce7-4cb0-b9b0-dd86773f4950
  16. 2016-08-11t10:01:48.5712515z tf /version:5
  17. 2016-08-11t10:01:48.7743791z done syncing repository cmmitestproject version 5 (workspace version c5)
  18. 2016-08-11t10:01:48.7743791z leaving tfvcsourceprovider.preparerepositoryasync
  19. 2016-08-11t10:01:48.9306711z running tasks
  20. 2016-08-11t10:01:48.9618802z starting task: build solution $/cmmitestproject/new folder/webapplication2/webapplication2.sln
  21. 2016-08-11t10:01:49.0243798z 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:\agent\tasks\vsbuild\1.0.26\ps_modules\vststasksdk\vststasksdk.psd1' -argumentlist @{ noninteractive = $true } -erroraction stop ; $verbosepreference = 'silentlycontinue' ; $debugpreference = 'silentlycontinue' ; invoke-vststaskscript -scriptblock ([scriptblock]::create('. ''c:\agent\tasks\vsbuild\1.0.26\vsbuild.ps1'''))"
  22. 2016-08-11t10:01:50.9931423z msbuild auto-detection: using msbuild version '15.0' 'c:\program files (x86)\msbuild\15.0\bin'.
  23. 2016-08-11t10:01:51.0087677z error parsing solution file @ c:\agent\_work\1\s\new folder\webapplication2\webapplication2.sln: version of msbuild not supported: 'microsoft.build, version=15.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a'
  24. 2016-08-11t10:01:51.2275183z ##[error]process 'nuget.exe' exited code '1'.
  25. 2016-08-11t10:01:51.3056442z finishing task: vsbuild
  26. 2016-08-11t10:01:51.3212704z starting task: copy files to: $(build.artifactstagingdirectory)
  27. 2016-08-11t10:01:51.3212704z set workingfolder default: c:\agent\tasks\copyfiles\1.0.13
  28. 2016-08-11t10:01:51.5400217z ##[debug]check path : c:\agent\tasks\copyfiles\1.0.13\task.json
  29. 2016-08-11t10:01:51.5400217z ##[debug]set resource file to: c:\agent\tasks\copyfiles\1.0.13\task.json
  30. 2016-08-11t10:01:51.5400217z ##[debug]system.culture=en-us
  31. 2016-08-11t10:01:51.5400217z ##[debug]load strings from: c:\agent\tasks\copyfiles\1.0.13\task.json
  32. 2016-08-11t10:01:51.5400217z ##[debug]load loc strings from: c:\agent\tasks\copyfiles\1.0.13\strings\resources.resjson\en-us\resources.resjson
  33. 2016-08-11t10:01:51.5556463z ##[debug]contents=**\bin\release\**
  34. 2016-08-11t10:01:51.5556463z ##[debug]sourcefolder=c:\agent\_work\1\s
  35. 2016-08-11t10:01:51.5556463z ##[debug]check path : c:\agent\_work\1\s
  36. 2016-08-11t10:01:51.5556463z ##[debug]targetfolder=c:\agent\_work\1\a
  37. 2016-08-11t10:01:51.5556463z ##[debug]cleantargetfolder=false
  38. 2016-08-11t10:01:51.5556463z ##[debug]overwrite=false
  39. 2016-08-11t10:01:51.5556463z ##[debug]include content pattern: **\bin\release\**
  40. 2016-08-11t10:01:51.5712721z ##[debug]find c:\agent\_work\1\s
  41. 2016-08-11t10:01:51.5712721z ##[debug]195 matches.
  42. 2016-08-11t10:01:51.5868969z ##[debug]allfiles contains 159 files
  43. 2016-08-11t10:01:51.5868969z ##[debug]include matching c:\agent\_work\1\s\**\bin\release\**
  44. 2016-08-11t10:01:51.5868969z ##[debug]include matched 0 files
  45. 2016-08-11t10:01:51.6025203z ##[debug]load strings from: c:\agent\tasks\copyfiles\1.0.13\node_modules\vsts-task-lib\lib.json
  46. 2016-08-11t10:01:51.6025203z ##[debug]load loc strings from: c:\agent\tasks\copyfiles\1.0.13\node_modules\vsts-task-lib\strings\resources.resjson\en-us\resources.resjson
  47. 2016-08-11t10:01:51.6025203z found 0 files
  48. 2016-08-11t10:01:51.6025203z finishing task: copyfiles
  49. 2016-08-11t10:01:51.6181475z ##[error]task vsbuild failed. caused job fail. @ logs task more details.

after trying multiple things, error got resolved after adding below arguments in nuget restore step  of vs build template:

-msbuildversion 14



Archived Forums V  >  Team Foundation Server - Build and release management



Comments

Popular posts from this blog

Conditional formatting a graph vertical axis in SSRS 2012 charts

Register with Power BI failed

SQL server replication error Cannot find the dbo or user defined function........