使用 TeamCity 运行批处理作业失败,但手动命令提示符有效
我在使用 TeamCity 运行批处理作业时收到此错误消息。批处理作业正在将文件从 TeamCity Server 复制到另一台服务器 (server2)。已检查多次,文件夹具有所需的所有权限,并且当从命令提示符手动运行批处理作业时,这工作正常(在服务器之间复制文件)。对于每个需要复制的文件,我都会遇到此错误。
错误 MSB3021:无法将文件“..\bin\Release\Boo.Lang.Compiler.dll”复制到“\Server2\DestinationFolder\”。找不到路径“\Server2\DestinationFolder”的一部分。[10:54:32]:正在创建目录“\Server2\DestinationFolder”。
我尝试了一些方法,但问题仍未解决。感谢您的意见。
I am getting this error message running a batch job with TeamCity. The batchjob is copying files from TeamCity Server to another server(server2). Have checked multiple times, the folders have all the rights permissions needed and this works fine (copies files between servers) when the batch job is run manually from command prompt. I have this error for each file that needs to be copied.
error MSB3021: Unable to copy file "..\bin\Release\Boo.Lang.Compiler.dll" to "\Server2\DestinationFolder\". Could not find a part of the path '\Server2\DestinationFolder'.[10:54:32]: Creating directory "\Server2\DestinationFolder".
I tried few things, but issue remains unresolved. Thanks for your input.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
TeamCity 构建代理以无权访问网络资源的
System
用户帐户身份运行,您应该将服务用户更改为具有网络权限的帐户,例如您的Administrator
帐户。另请参阅相关问题。
TeamCity build Agent is running as
System
user account that has no access to the network resources, you should change the service user to an account that has network permissions, like yourAdministrator
account.See also the related question.