Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TF270003: Failed to copy

This pertains to:

  • Visual Studio 2013
  • Team Foundation Server 2010

Error:

TF270003: Failed to copy. Ensure the source directory \\TFSFileStore\TFSBuild\Xxx\Yyy\_PublishedWebsites\Zzz exists and that you have the appropriate permissions.

_PublishedWebsites does not exist. The problem is that it isn't being created by MSBuild. Even if I were to manually create those folders, the files don't get copied there.

We just upgraded from Visual Studio 2010 to 2013.


After perusing the log files, it seems as though the wrong MSBuild is being used. It's using:

C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe

when it should be using:

C:\Program Files (x86)\MSBuild\12.0\Bin\amd64\MSBuild.exe

Any ideas on how to get TFS to use the correct MSBuild executable?


I followed http://hamidshahid.blogspot.com/2013/10/building-visual-studio-2013-solutions.html:

1) Find all instances of the MSBuild activity. The activity is named as “Run MSBuild for Project” within the build templates as show below:

enter image description here

2) Change the ToolsPath of the activity to point to the MSBuild 12.0 exe file as shown below:

enter image description here

However ... the log in Diagnostic mode shows the following for Run MSBuild for Project:

Initial Property Values
    AdditionalVCOverrides = 
    CommandLineArguments = /p:SkipInvalidConfigurations=true /tv:12.0
    Configuration = Release
    GenerateVSPropsFile = True
    LogFile = 
    LogFileDropLocation = \\Xxx\Yyy\Zzz\logs
    MaxProcesses = 1
    OutDir = E:\Builds\Xxx\Binaries
    Platform = Any CPU
    Project = E:\Builds\Xxx\Xxx.sln
    ResponseFile = 
    RunCodeAnalysis = AsConfigured
    Targets = 
    TargetsNotLogged = String[] Array
    ToolPath = 
    ToolPlatform = X86
    Verbosity = Diagnostic

C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe 

Somehow, the ToolPath property that I set to:

C:\Program Files (x86)\MSBuild\12.0\Bin\amd64\

is getting overridden and set to empty.

like image 273
Code Maverick Avatar asked Oct 01 '22 08:10

Code Maverick


1 Answers

If your build process template is from an earlier version of TFS, you might need to edit your template and modify an MSBuild activity property.

If your build server is running:

Visual Studio Team Foundation Server 2013: Set the MSBuild activity ToolVersion property to 12.0

Visual Studio Team Foundation Server 2012: Set the MSBuild ToolPath property to the path to the path to MSBuild 12. In many cases, this path is either C:\Program Files (x86)\MSBuild\12.0\Bin\ (32-bit) or C:\Program Files (x86)\MSBuild\12.0\Bin\amd64 (64-bit). You must also install Visual Studio 2013 on the build agent.

MSDN Source

like image 66
Isaiah4110 Avatar answered Nov 12 '22 23:11

Isaiah4110