我应该在项目的源代码管理中包含 VB 宏吗?

发布于 2024-09-01 15:00:00 字数 540 浏览 2 评论 0原文

对于 C# 项目,我在 Visual Studio 中使用了多个 Visual Basic 宏。我只是考虑这些对从事 C# 项目的其他开发人员有用。

到目前为止的宏包括在保存时删除尾随空格,组织 using 指令并删除不必要的指令,以及覆盖 Ctrl-M Ctrl-O 来扩展区域。我在 Subversion 中将此宏代码包含在我的 C# 项目中是否合理?

我不知道宏是否有可能仅仅因为您打开特定的解决方案文件就在 Visual Studio 中可用/工作,并且这可能过于侵入性,因为某些宏会覆盖现有的 Visual Studio 行为。

For a C# project, I make use of several Visual Basic macros in Visual Studio. I was just considering that these would be of use to other developers that work on the C# project.

The macros so far include removing trailing whitespace on save, organizing using directives and removing unnecessary ones, and an override for Ctrl-M Ctrl-O that expands regions. Would it be reasonable for me to include this macro code with my C# project in Subversion?

I don't know if it's even possible for macros to be made available/work in Visual Studio just because you open a particular Solution file, and that might be too invasive since some of the macros override existing Visual Studio behavior.

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

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

发布评论

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

评论(1

离鸿 2024-09-08 15:00:00

这些更像是“有用的工具”,而不是项目的一部分的代码。我不会将它们作为 C# 项目的一部分放在 SVN 中,但如果您认为它们足够有用,可供其他团队成员使用,您可以专门为这些类型的工具设置另一个 SVN 项目。然后您的其他团队成员就可以根据自己的需要使用它们。

我认为你必须将宏代码保存到一个文件中,然后你可以将该文件签入 SVN 中。每当您更改宏代码时,您都可以使 SVN 保持最新的宏代码。

These are more like "useful tools" rather than code that is part of your project. I would not put them in SVN as part of your C# project, but if you think they are useful enough to be used by other team members, you could set up another SVN project just for these types of tools. Then your other team members could use them at their desire.

I think you would have to save the macro code to a file, and then you could just check the file into SVN. Whenever you changed the macro code, you could just keep SVN up to date with the latest macro code.

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