Visual Studio 2003 预构建脚本找不到“svn” 命令
我正在使用一个脚本从 subversion 存储库获取 subversion 头修订号,该存储库源自 http://blog.guymahieu.com/2008/06/09/getting-the-svn-head-revision- number-from-a-windows-batch-file/。 当从普通命令行调用时,该脚本工作正常,但是当使用路径 $(ProjectDir)/../getSVNRev.bat 调用与预构建事件相同的批处理文件时,命令 svn 未知。
svn.exe的路径在标准系统%Path%中,但VS似乎使用了另一个路径。 我在批处理文件中回显了 %Path% 变量,并且 %Path% 似乎设置为 VC++ 二进制路径。 我将 svn.exe 的路径添加到 VC++ 二进制路径中,得到了回显,但仍然找不到 svn.exe。
我什至将 svn.exe 和所有 dll 复制到 system32 中,但 VS 命令行仍然无法识别 svn 命令。
我是否应该在其他位置添加路径,以便 VS.NET 2003 上的预构建事件识别 svn.exe?
谢谢, 诺伯特
I'm using a script to get the subversion head revision number from a subversion repository derived from the script found at http://blog.guymahieu.com/2008/06/09/getting-the-svn-head-revision-number-from-a-windows-batch-file/. The script works fine when called from a normal command line, but when calling the same batch file as pre-build-event with path $(ProjectDir)/../getSVNRev.bat the command svn is unknown.
The path to svn.exe is in the standard system %Path% but it seems that VS uses another path. I echoed the %Path% variable in the batch file and the %Path% seems to be set to the VC++ binary path. I added the path to svn.exe to the VC++ binary path, got that echoed, but still the svn.exe was not found.
I even copied svn.exe and all dlls into system32 but still, the command svn was unknown to the VS command line.
Are there any other locations I should add the path, so that the pre-build event on VS.NET 2003 recognizes svn.exe?
Thanks,
Norbert
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为您想要转到“工具”->“选项”->“项目和解决方案”->“VC++ 目录”,然后确保“显示目录”设置为“可执行文件”并且您的平台设置为 Win32,然后添加将可执行文件所在的目录添加到列表中,或者只需将 $(Path) 添加到列表中,以便您的系统路径最终位于其中。
I think you want to go to Tools->Options->Projects and Solutions->VC++ Directories, then make sure that "Show directories for" is set to "Exectuable Files" and your platform is set to Win32, then add the directory with the executable to the list, or just add $(Path) to the list so that your system paths end up in there.