1

I am using VS2015 update 3. I am getting following errors when doing TFS Build.

TFS Build errors are below or this link

enter image description here I have tried my level best to solve the 4 errors first but it is not solving by anyhow. Today, I have downgraded my .net framework to 4.5.2 from 4.6 but still the errors & build fails remains as it is.

I am new into all these TFS features. Can any of you please guide me or help me?

Karthik N G
  • 2,111
  • 1
  • 19
  • 20
Ishan Malik
  • 139
  • 3
  • 12
  • Does the Microsoft.WebApplications.targets file actually exist in the MSBuild path specified on the build server? Also it doesn't look like .NET 4.5.2 is installed on the build server?? – dparsons Jan 05 '17 at 15:51
  • Do you have the same VS version installed on the build server? – Eddie Chen - MSFT Jan 09 '17 at 07:49

1 Answers1

2

Your real issue is the compilation failure: to fix it, install the Web Deploy package and also .NET 4.5.2 on the build machine.
Also you are using VS2012, is it really a constraint? Can't you use a more recent version of VS?

Moreover I would suggest to switch to the vNext Build system of TFS, and ditch the XAML build system that you are using, as the former has lot more features and it is actively improved everyday, while the latter is frozen and obsolete.

Finally the Bug title "bug created during the build" is caused by your XAML build definition that states to create a new Bug work item whenever the build is failing, and in your case the build is failing. That Bug work item is not an issue at all, it is by design :)

Luca Cappa
  • 1,925
  • 1
  • 13
  • 23
  • Site is already running in server too. So, I don't think there is any compilation error exists. – Ishan Malik Jan 06 '17 at 09:07
  • 1
    In the screenshot the build summary shows 4 errors and 9 warnings, as I said probably due to missing requirements on the build machine. To investigate this problem I would suggest to compile the solution with msbuild.exe on the build server, spot the error on the build log and fix it (or you could just queue the build with TFS and retrieve the build log by means of the View Log File link on the Build Summary). The fact that the site is running is honestly irrelevant as it has little to do with your question. – Luca Cappa Jan 06 '17 at 10:31
  • You need to have Visual Studio installed on your build agent. – MrHinsh - Martin Hinshelwood Jan 06 '17 at 13:39
  • See this link... http://i.imgur.com/G8NRnVX.png. Solution build is working but only TFS build is not working. – Ishan Malik Jan 06 '17 at 15:06
  • yes, it is common that the build on one machine works (e.g. your one), and it does not on another (e.g. the build machine). It is then our job to understand the issue and fix it. Usually the issue is a missing component (or requirement) needed during compilation. – Luca Cappa Jan 06 '17 at 15:26
  • Likely the Build Agent does not have Visual Studio installed on it. – MrHinsh - Martin Hinshelwood Jan 07 '17 at 20:58