Visual Studio 2019 在保存时禁用自动构建解决方案 [英] Visual Studio 2019 disable auto-building solution on save

查看:60
本文介绍了Visual Studio 2019 在保存时禁用自动构建解决方案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Visual Studio 2019 企业版来处理 .NET 项目.我以前没有注意到它,但似乎每次我保存文件时,解决方案都在构建.我推断这是因为当我保存时,我可以在底部窗格中看到一个带有红色 X 的数字.如果我单击底部窗格,它将打开一个控制台,显示构建错误.每次保存时都会改变.

I am using Visual Studio 2019 enterprise to work on a .NET project. I wasn't noticing it before, but it seems like every time I am saving a file, the solution is building. I am inferring this because when I save, I can see a number with a red X next to it in the bottom pane. And if i click on the bottom pane, it will open up a console showing me build errors. This changes every time I save.

这是一个令人讨厌的功能".我搜索了多种解决方案,但没有一个有效.解决方案的代码分析"选项已弃用,因此您无法更改它.我也没有任何异常的扩展,所以这看起来像一个 VS 特性.

This is an annoying "feature". I searched for multiple solutions, but none of them work. The "code analysis" option for a solution is deprecated, so you can't change it. I don't have any abnormal extensions either, so this looks like a VS feature.

推荐答案

当我保存时,我可以在底部窗格中看到一个带有红色 X 的数字.如果我单击底部窗格,它将打开一个控制台,显示构建错误.

when I save, I can see a number with a red X next to it in the bottom pane. And if i click on the bottom pane, it will open up a console showing me build errors.

如评论中所述,打开的是错误列表,默认情况下显示构建 IntelliSense 错误.保存文件时不会自动构建,但 IntelliSense 在编辑时自动更新,并在错误列表中显示它发现的错误.

As clarified in the comments, what opens is the Error List, which by default displays both build and IntelliSense errors. There is no automatic build taking place when saving files, but IntelliSense does auto-update while editing, and displays the errors it finds in the Error List.

要阻止 Intellisense 在错误列表中报告错误,请在红色圆圈下拉菜单中选择 Build Only 选项.

To stop Intellisense from reporting errors in the Error List, choose the Build Only option in the dropdown circled in red.

这篇关于Visual Studio 2019 在保存时禁用自动构建解决方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆