尝试从 TFS Build 2010 运行 corflags
我正在 TFS 2010 中使用 InvokeProcess 活动来尝试在构建的 exe 上运行 corflags 应用程序。
C:\Builds\4\testing\Sources\BuildAssets\corflags.exe C:\Builds\4\testing\Binaries\Executable.exe /32bit+
但是我收到以下消息:
corflags:错误 CF001:无法打开文件进行写入
我正在本地计算机上运行 TFS 构建代理,因为我当前处于测试阶段,并且当我从命令行运行完全相同的命令时,corflags 应用程序完成且没有错误。
任何想法将不胜感激。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不熟悉具体情况,但有一些一般想法:
构建是谁运行的?该用户是否具有输出路径的权限?
另一个考虑因素是:在尝试执行命令之前构建是否已完成?
尝试将命令更改为非常简单的命令,例如键入“OutputFile” - 这会遇到同样的问题吗?如果是这样,那就是权限/时间问题。如果没有,那就是特定的命令 - 但至少我们已经缩小了问题的范围。
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.
我也不知道 corflags,但它正在使用工作区中的文件(从版本控制下载的文件)。默认情况下,此文件有一个只读标志。
因此,如果您需要此文件可写:
1) 如果您在版本控制中需要此文件,请检出该文件,然后再次检入它(tf checkout / tf checkin)
2) 如果文件是由应用程序创建的,则从版本控制中删除该文件
3) 使用 attrib 命令删除只读标志。
I don't know the corflags either, but it is using a file in the workspace (a file that is downloaded from Version Control). There is a readonly flag on this file by default.
So if you need this file to be writable:
1) either checkout the file if you need this file in your version control and afterwards check it in again (tf checkout / tf checkin)
2) remove the file from version control if the file is created by the app
3) remove the readonly flag with the attrib command.