Visual Studio 2003 预构建脚本找不到“svn” 命令

发布于 2024-07-20 06:58:17 字数 702 浏览 8 评论 0原文

我正在使用一个脚本从 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

青萝楚歌 2024-07-27 06:58:17

我认为您想要转到“工具”->“选项”->“项目和解决方案”->“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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文