Mono/C# 的文档和构建系统

发布于 2024-10-12 13:19:12 字数 561 浏览 12 评论 0原文

我正在开始一个新项目,团队成员决定使用 C# 作为实现语言。我对 C# 没有太多经验,但简单阅读一下就知道它非常有能力成为一个完整的跨平台虚拟机。除了语言之外,随着项目的发展,我在选择管理代码的工具和工作流程方面也遇到了困难。它应该相当小(<10K 行),但我希望能够随着项目的增长生成文档、管理我们决定使用的任何外部依赖项以及自动化构建和测试。我想知道这种语言常用的工具或被认为是最佳实践的工具。

我主要关心构建系统如何在 *nix 和 Windows 上工作?有 C# 专用工具还是 Make 更常见?另外,我想使用dvcs,但看起来Visual Studio和MonoDevelop不支持相同的dvcs。 C# 常用的 vcs 选择是什么?对于测试,C#/Mono 是否可以进行单元测试?最后,我知道有很好的文档生成器,但是对于构建系统的问题,我真的希望它只是构建中的一个步骤,类似于测试是一个步骤。通常我会使用 Hudson 进行自动化,但我想知道该平台是否有更具体的东西。

总的来说,我希望看到一个解决方案能够在 Windows 和 *nix 上提供良好的工作流程,而无需承担沉重的管理负担。我非常确定这是项目管理的圣杯,所以任何让我走上这条道路的事情都很棒。

I'm starting out on a new project and a team member has decided to use C# as the implementation language. I don't have a lot of experience in C#, but a brief reading shows that it's very capable of being a complete cross-platform vm. Beyond the language, I've been having trouble selecting tools and workflows for managing the code as the project grows. It should be fairly small (<10K lines) but I would like to have the ability to generate documentation as the project grows, manage any external dependencies that we decide to use, and automate builds and testing. I am wondering what tools are commonly used or considered best practices for this language.

I am mainly concerned with how would a build system potentially work on *nix as well as windows? Are there C# specific tools or is Make more common? In addition, I'd like to use a dvcs, but it doesn't look like Visual Studio and MonoDevelop support the same ones. What's the common vcs of choice for C#? For testing sort of Unit testing is available for C#/Mono? Finally, I know that there are good doc generators, but with the question of the build system, I would really like to have that just be a single step in the build similar to how testing is a step. Normally I'd automate with Hudson, but I am wondering if there is something more specific to the platform.

Overall, I'd love to see a solution that provides a decent workflow on both windows and *nix without a heavy admin burden. I am pretty sure this is the holy grail of project management, so anything that puts me on that path is awesome.

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

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

发布评论

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

评论(5

桃酥萝莉 2024-10-19 13:19:12

在我从事的一个项目中,我们使用 Visual Studio 2010、MonoDevelop/XBuild、Git 和 monodoc。由 Visual Studio 2010 创建的项目文件可以很容易地被 MonoDevelop 和 XBuild 读取。此外,Git 是分布式开发的优秀 VCS(我特别喜欢它的分支)。 Monodoc 通过对命令行参数进行一些调整,可以从代码中的 XML 注释生成文档。

In a project I work on, we use Visual Studio 2010, MonoDevelop/XBuild, Git, and monodoc. Project files created by Visual Studio 2010 can easily be read by MonoDevelop and XBuild. Also, Git is an excellent VCS for distributed development (I especially like its branching). Monodoc, with some tweaking of command line parameters, can generate documentation from XML comments in code.

梦明 2024-10-19 13:19:12

您可以使用任何您想要的 dvc。 MonoDevelop(至少在主干中,不确定是否已经发布)内置了 Git 支持。 Visual Studio 的一些插件也为您提供了 Git。

不管怎样,你不需要将源代码管理集成到 IDE 中,事实上,我不希望这样,如果我在 Windows 中,则使用 TortoiseGit 中的 Git,或者从 OS X 上的命令行(尽管我'我正在寻找 OS X 方面的 Gitti)。

对于构建,我建议使用 TeamCity,因为它支持最多三个远程代理,允许您使用免费版本在 Windows/Linux/Mac 上进行构建。

对于构建,我会使用 NAnt,尽管 mono 下的 xbuild 可以使用解决方案文件,因此这可能比维护两个构建脚本更容易。我喜欢 NAnt for CI 只是因为我发现它更容易分解为构建、测试、覆盖、打包、部署等。

我发现 MonoDevelop、Git、TeamCity 和 NAnt 的组合为您提供了一些不错的跨平台开发设置。

You can use any dvcs you'd like with it. MonoDevelop (at least in the trunk, not sure if it has been released yet) as Git support built in. There are some plugins for Visual Studio that give you Git too.

Either way though, you don't need your source control to be integrated within the IDE, infact I prefer it not to be and use Git from TortoiseGit if I'm in windows, or from the command line on OS X (although I'm looking at Gitti for the OS X side).

For build, I would suggest TeamCity, since it supports up to three remote agents allowing you to build on Windows/Linux/Mac with the free version.

For build I'd use NAnt, although xbuild under mono works with solution files so that might be easier rather than maintaining two build scripts. I like NAnt for CI simply because I find it easier to break apart into build, test, cover, package, deploy etc.

I've found that the combination of MonoDevelop, Git, TeamCity and NAnt gives you a few nice cross-platform development setup.

末蓝 2024-10-19 13:19:12

我建议你主要尝试使用一种IDE。我猜大多数 Mono IDE 都支持 Visual Studio 格式。至少 SharpDeveblop 是这样的。

http://mono-tools.com 似乎是仅在 Windows 中开发 .NET 和 Mono 的正确方法(不是自由的)。我认为如果我在商业环境中认真地进行单声道开发,这是最好的选择,但不是 1005 确定。

http://sharpdevelop.com 看起来也很有希望,但仍然感觉像是穷人的选择。

http://monodevelop.com/ 是在 Linux 中进行 Mono 开发的方法。

对于 DVCS,您始终可以使用 Tortoise 的东西并且独立于 IDE。 git 在 Linux 上运行得很好,而 TortoiseGit 在 Windows 上也非常好用。然而,就名气而言,SVN(当然不是DVCS)仍然占主导地位,特别是它的客户端可以通过桥连接到TFS。不过,Mercurial 和 Git 已开始在 C# 社区中占据一席之地。

I suggest you try to use one IDE mainly. Most Mono IDEs support Visual Studio formats I guess. At least SharpDeveblop does.

http://mono-tools.com seems the correct way to develop for .NET and Mono only in Windows (not free). I think this is the best option if I ever take developing for mono seriously ina commercial environment, but not 1005 sure.

http://sharpdevelop.com looks promising too, but still fells like the poor man option.

http://monodevelop.com/ is the way to go for developing for Mono in Linux.

For DVCS you can always use Tortoise stuff and be IDE independent. git works great in Linux and TortoiseGit on Windows is very nice. However, it terms of fame, SVN (not DVCS of course) is still dominant, especially it's client can connect to TFS via bridge. Mercurial and Git are starting to take place in C# community though.

幸福不弃 2024-10-19 13:19:12

CruiseControl.Net 是一个非常好的构建/持续集成系统。它可以集成大量应用程序进入构建过程;我们使用 NAnt 进行构建、NUnit 单元测试,并使用 FXCop 进行代码分析。

CruiseControl.Net is a pretty good build / continuous integration system. It can integrate a load of applications into the build process; we use NAnt for builds, NUnit unit tests and FXCop for code analysis.

花想c 2024-10-19 13:19:12

Cake (C# Make) 是一个开源构建自动化系统,采用基于 C# 的领域特定语言,可以执行编译代码等操作、复制文件/文件夹、运行单元测试、压缩文件并构建 NuGet 包。它具有大量其他内置功能,并且可以使用自定义代码轻松扩展。它适用于 Windows、Linux 和 OS X,并且可与多个持续集成系统一起使用,例如 AppVeyor、TeamCity、TFS、VSTS 或 Jenkins。

Cake (C# Make) is an open source build automation system with a C# based domain specific language that can do things like compiling code, copy files/folders, running unit tests, compress files and build NuGet packages. It has tons of other built-in functionality and can easily be extended with custom code. It's available for Windows, Linux and OS X and can be used with several continuous integration systems such as AppVeyor, TeamCity, TFS, VSTS or Jenkins.

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