tfstfsbuildcorflags

Trying to run corflags from TFS Build 2010


I am using an InvokeProcess activity in TFS 2010 to try and run the corflags application on a built exe.

C:\Builds\4\testing\Sources\BuildAssets\corflags.exe C:\Builds\4\testing\Binaries\Executable.exe /32bit+

However I am getting the following message:

corflags : error CF001 : Could not open file for writing

I am running the TFS Build Agent on my local machine because I am currently in a testing phase, and when I run the exact same command from the command line, the corflags application completes without error.

Any ideas would be greatly appreciated.


Solution

  • I'm not familiar with the specific situation but some general ideas:

    Who is the build running as? Does that user have permissions to the output path?

    Another consideration is: Has the build completed before it attempts to execute your command?

    Try changing the command to be something really simple eg Type "OutputFile" - Does this hit the same issue? If so, it's a permission/timing issue. If not, it's the specific command - but at least we'll have narrowed the problem down.