visual-studio-2010 – 致命错误lnk1104:无法打开LNKn.tmp

当我尝试使用Bamboo的Visual-Studio任务构建我的MSVC2010项目时,我收到以下错误:

LINK : fatal error LNK1181: File "C:\Windows\system32\config\systemprofile\AppData\Local\Temp\lnk7A64.tmp" could not be opened.

msdn这个说:

If the given file is named LNKn, which is a filename generated by the linker for a temporary file, the directory specified in the TMP environment variable may not exist, or more than one directory is specified for the TMP environment variable. (Only one directory path should be specified for the TMP environment variable.)

所以我检查了我的TMP变量,它只有一个目录,它确实存在.
实际上甚至生成了一个文件,而不是正确的文件.
例如,我启动构建,创建了lnk7A64.tmp,但链接器查找lnk7A64.tmp

我只用Bamboo得到这个错误.它适用于Visual Studio.
关于为什么会发生以及如何解决它的任何想法?

更新:

我开始认为这可能是,因为Bamboo无法找到创建正确文件所需的可执行文件(可能是ressource编译器).我以前描述过这个here.我以为我可以解决这个问题,但似乎它也导致了这个错误.

最佳答案 我遇到了同样的问题(这让我想到了你的问题!).我发现默认情况下,竹代理服务运行为“SYSTEM”,这与我的构建没有关系.按照Atlassian的本指南更改您的Bamboo代理运行的用户.我这样做了,它现在有效.

https://confluence.atlassian.com/display/BAMBOO/Running+Bamboo+service+on+Windows+as+the+local+user

点赞