Visual Studio 是否持续编译?

发布于 2024-09-26 18:13:09 字数 102 浏览 1 评论 0原文

在VS中工作时,底部面板中的错误消息是编译器错误和警告,对吧?这是否意味着应用程序一直在编译?我希望这些仅在尝试运行应用程序时出现。

这可能是一个愚蠢的问题,但我找不到答案。

When working in VS, the error messages in the bottom panel are compiler errors and warnings, right? Does this mean the app is being compiled all the time? I would expect those to appear only when trying to run the app.

This is probably a silly question, but I cannot find the answer.

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

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

发布评论

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

评论(4

触ぅ动初心 2024-10-03 18:13:09

Visual Studio不断解析源代码;这使得它可以在您实际编译源代码之前先发制人地报告一些错误。

当然,这取决于您使用的语言。 C++ 直到 Visual Studio 2010 才获得抢占式错误报告。

Visual Studio continually parses the source code; this allows it to preemptively report some errors before you actually compile the source.

This is, of course, dependent upon which language you are using. C++ didn't get preemptive error reporting until Visual Studio 2010.

哭泣的笑容 2024-10-03 18:13:09

Visual Studio 本身并不连续编译代码。

不过,我刚刚下载了这个名为 .Net Demon 的小应用程序的 14 天试用版,它是 Visual Studio 的插件。它的价格为 30 美元,但如果您有许多项目的大型解决方案,这绝对是一个很棒的工具。

http://www.red-gate.com/products/dotnet- development/dotnet-demon/

我可能最终会崩溃并购买它,它非常光滑。

Visual Studio doesn't natively continuously compile code.

However, I just downloaded the 14 day trial of this little app called .Net Demon that's a plugin for Visual Studio. It costs $30, but definitely a nifty tool if you've got large solutions with many projects.

http://www.red-gate.com/products/dotnet-development/dotnet-demon/

I'll probably end up breaking down and buying it, it's pretty slick.

浊酒尽余欢 2024-10-03 18:13:09

每种编程语言都是不同的(每种语言都提供特定于该语言的 Visual Studio“语言服务”来提供反馈),但在大多数情况下,是的,它会被一遍又一遍地编译。以F#为例,编译器分为几个阶段,主要是词法分析器/解析器、类型检查器和代码生成器,词法分析器/解析器/类型检查器在VS内部运行,每次在文件中输入一个字符时,该文件将通过编译器的这些阶段重新运行。

Each programming language is different (each provides a Visual Studio 'language service' specific to that language that provides the feedback), but for the most part, yes, it is being compiled over and over. In F#, for example, the compiler is divided into a few stages, main ones being lexer/parser, typechecker, and code generator, and the lexer/parser/typechecker are running inside VS, and every time you type a character into a file, that file is re-run through those stages of the compiler.

2024-10-03 18:13:09

当您编译应用程序时,可能会出现错误和警告,这些错误和警告将显示在错误窗口中。当您运行应用程序时,错误将不再显示在 Visual Studio 中,但根据应用程序的组织方式,它会崩溃或正常处理它们。另请注意,如果您尝试使用 F5Ctrl+F5 运行应用程序,Visual Studio 将首先尝试编译它,如果存在编译时错误和警告,它们将被显示。

When you compile an application there might be errors and warnings which will be shown at the errors window. When you run the application errors will no longer be shown in Visual Studio but depending on how your application is organized it will either crash or handle them gracefully. Also notice that if you try to run the application with F5 or Ctrl+F5 Visual Studio will try to compile it first and if there are compile-time errors and warnings they will be shown.

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