关于csc.exe,有​​必要学吗?

发布于 2024-10-08 12:37:52 字数 1431 浏览 0 评论 0原文

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

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

发布评论

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

评论(3

泅人 2024-10-15 12:37:52

您可能会像我一样发现,有时启动记事本(或您最喜欢的文本编辑器)来创建简单的 C# 程序会更容易。然后使用命令行工具快速编译它,而不必费心启动 Visual Studio、构建项目等。只需键入:

csc /t:exe MyProgram 就变得更加容易和快捷。 cs

知识很少是无用的。有些你认为“无聊”的事情实际上是最重要的,最终也是最有趣的。

就 .NET 命令行工具而言,我建议了解它们——存在哪些工具、它们做什么以及如何操作它们——但我不会说您需要成为命令行专家。

You might find, as I did, that sometimes it's just easier to start up Notepad (or your favorite text editor) to create a simple C# program. Then use the command line tool to compile it quickly, without having to go to the trouble of starting Visual Studio, building a project, etc. It's a whole lot easier and faster to just type:

csc /t:exe MyProgram.cs

Knowledge is rarely useless. Some of the things you consider 'boring' turn out to be the most important and eventually the most interesting.

In the case of the .NET command line tools, I would suggest learning about them--what tools exist, what they do, and how to operate them--but I wouldn't say that you need to become a command line guru.

顾冷 2024-10-15 12:37:52

这在很大程度上取决于您计划如何使用 C#。如果您仅从 Visual Studio 或其他 IDE 构建内容,那么它可能不是一个优先事项。但是,如果您将使用其他工具(例如 ant)构建 C# 项目,您应该熟悉它。

It depends a lot on how you plan to use C#. If you're building things only from Visual Studio or another IDE, it's probably less of a priority. However, if you'll be building C# projects using other tools (ant, for example), you should familiarize yourself with it.

狂之美人 2024-10-15 12:37:52

如果您有 Visual Studio 这样的工具,那么您很可能无需学习命令行编译即可摆脱困境。然而,在您没有高级 IDE 的情况下,了解它们会很有帮助。

这适用于所有语言,而不仅仅是 C#。

If you have a tool like Visual Studio, you can most probably get away without learning command line compilation. However, knowing them would be of advantage in situations when you don't have advance IDE.

This goes for every language and not just c#.

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