I am using TFS 2013 to build my project but sometimes I am getting the error as:
The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\WebApplications\Microsoft.WebApplication.targets" was not found.Confirm that the path in the declaration is correct, and that the file exists on disk.
I have gone through many answers and found a lot of workaround to fix it but “in my case the problem is that sometime my build is success and sometimes it is failing.”
Let say I am running my build for 10 times then 3-4 times it is passing and 6-7 times it is giving error.
I have checked the path on server and the file
"C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\WebApplications\Microsoft.WebApplication.targets"
exists at the same location where TFS build is looking for.
I have also visited the link
TFS build errors a file not found, while file exists
but there is no answer provided on this thread.
I want to do very minimal changes. Please suggest what would be the possible solution to make .targets file always available.
Update:
I have found a similar question at the link
TFS Build missing .targets files intermittently
but the answer provided at this thread does not solve my problem and even if it's a kind of question again not the solution that's why I have started a separate thread.