【问题标题】:getting The command exited with code -532459699 while building from TFS从 TFS 构建时,命令以代码-532459699 退出
【发布时间】:2012-01-26 09:12:37
【问题描述】:

以下是日志文件的副本

   Creating directory "obj\Release\".
PreBuildEvent:
C:\Builds\2\box\IT\Sources\IT\jsmin\jsmin.exe
cwd is 'C:\Builds\2\box\IT\Binaries'

Unhandled Exception: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Builds\2\box\IT\Binaries\Shared\Javascript\Model\CModel_uncompressed.js'.
 at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
 at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
 at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
 at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options)
 at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize)
 at System.IO.StreamWriter..ctor(String path, Boolean append)
 at System.IO.File.CreateText(String path)
 at JsMin.Program.Main(String[] args) in Z:\downloads\JsMinTest\JsMinTest\JsMinConsole\Program.cs:line 52
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets(902,9): error MSB3073: The command "C:\Builds\2\box\IT\Sources\IT\jsmin\jsmin.exe" exited with code -532459699. [C:\Builds\2\box\IT\Sources\IT\IT.vbproj]
Done Building Project "C:\Builds\2\box\IT\Sources\IT\IT.vbproj" (default targets) -- FAILED.

我检查了路径 jsmin.exe 在路径上。但是 TFS 没有创建共享目录,如以下链接中所述

C:\Builds\2\box\IT\Binaries\Shared\Javascript\Model\CModel_uncompressed.js. 

请指导我所缺少的。

【问题讨论】:

  • 所以C:\Builds\2\box\IT\Binaries下面没有\Shared,对吧?您的CModel_uncompressed.js 是否位于Binaries 下的其他位置?
  • 是 否 \共享目录。并且也无法在二进制文件下找到该模型。
  • FYI -532459699 = 0xE0434F4D,这是 COM 结构化异常代码。
  • 好吧,那就创建目录吧。预构建事件应该做得很好。

标签: visual-studio-2010 msbuild tfsbuild


【解决方案1】:

如果我理解正确,你有一个C:\Builds\2\box\IT\Sources\..\Model\*.js
然后你试图在“C:\Builds\2\box\IT\Binaries..”上缩小这个 *.js。失败是因为该文件不可用。

一种方法是在 VStudio 中更改 *.js 的属性。在解决方案资源管理器上右键单击它,选择“属性”并将“复制到输出目录”设置为“始终复制”。这应该在 TFS 构建期间将您的文件传送到 Binaries 目录。

另一个想法是直接在 \Sources 目录中强制执行压缩程序(将 cwd 设置为 C:\Builds\2\box\IT\Sources\Shared)。
后者似乎更合理对我来说 - 不过,请注意,我从未使用过缩小器。

【讨论】:

  • 尝试了第一个选项,但结果仍然相同。因为它只是没有在二进制文件下创建任何共享文件夹,如果我在下次构建时手动创建它,它就不再存在了。不知道以后因为不明白该怎么做。
  • 如何将 cwd 设置为 C:\Builds\2\box\IT\Sources\Shared
  • 右键单击 *.csproj 上的解决方案资源管理器并选择“属性” - 然后转到“构建事件”。您能否分享一下您当前在“预构建事件命令行”下的条目是什么?
  • 它的 $(ProjectDir)jsmin\jsmin.exe
  • 仅此而已?显然 $(ProjectDir) 可以解决,但我希望有一些 $(OutDir) 标记将工具(jsmin.exe)指向它的目标(*.js 文件)。也许 jsmin 在配置文件上运行?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-05-08
  • 1970-01-01
  • 2020-09-02
  • 1970-01-01
  • 2016-06-26
相关资源
最近更新 更多