打印整个项目源代码

发布于 2024-12-21 07:48:24 字数 1539 浏览 3 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

迷雾森÷林ヴ 2024-12-28 07:48:24

它没有内置到 VS 中。但是您可以在 http://msdn.microsoft 找到执行此操作的宏.com/en-us/library/ms973240.aspx
此外,修改后的版本位于 https://stackoverflow.com/a/683835/337294

It's not built into VS. But you can find a macro that does the job at http://msdn.microsoft.com/en-us/library/ms973240.aspx.
Also, a modified version is loacted at https://stackoverflow.com/a/683835/337294

乄_柒ぐ汐 2024-12-28 07:48:24

项目文件是一个 XML 文件。您可以提取文件名,然后将它们通过管道传输到您喜欢的任何工具。如果您的 Windows 系统上有任何类似 UNIX 的工具,您可以执行以下操作来打印所有 .cpp 文件:

grep -o "\".*\.cpp\"" MyProject.vcxproj | xargs cat

A Project file is an XML file. You can extract the filenames and then pipe them to any tool you like. If you have any unix-like tools on your Windows system you can do the following to print all .cpp files:

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