Visual Studio 2010不会捕获编译时的编译错误 [英] Visual Studio 2010 is not catching compile errors on build

查看:179
本文介绍了Visual Studio 2010不会捕获编译时的编译错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个web项目运行在Visual Studio 2010和目标.Net框架4.当我'Build'的解决方案,它会告诉我的构建是成功的,即使在代码中有(已知的)错误。如果我打开一个有错误的页面,编译器然后将拾起错误,并以蓝色而不是红色下划线。

I have a web project running in Visual Studio 2010 and target .Net framework 4. When I 'Build' the solution it will tell me the build was successful even though there are (known) errors in the code. If I open a page that has an error, the compiler will then pick up on the error and underline it in blue instead of red.

有没有设置会驱动这种行为?任何想法如何解决?

Is there a setting that would drive this kind of behavior? Any ideas on how to fix?

推荐答案

我有类似(如果不是相同的)编译ASP.net 4.0 WebForm。我有一个页面是一个现有的页面的标记的副本,但代码隐藏尚未创建。作为示例,标记具有带有点击事件的ASP:Button,但是事件处理程序尚未在代码中声明。当我做一个完整的构建/重建/清洁等,没有找到错误。我打开页面,并引发一个编译器错误。据我所知,我没有对任何地方的设置进行任何更改,刚刚开始这样做最近。此外,似乎我的断点也不会被捕获。我不知道这两个是否相关,但他们确实开始发生在同一时间。

I'm having similar (if not identical) problems with compiling an ASP.net 4.0 WebForm. I have a page that is a copy of an existing page in terms of markup, but the code-behind has not been created. As an example, the markup has an ASP:Button with a click event, but the event handler has not been declared in the codebehind yet. When I do a full Build/Rebuild/Clean etc., no errors are found. I open the page, and a compiler error is thrown. As far as I know I haven't made any changes to settings anywhere, just started doing this recently. Additionally, it appears that my break points aren't being caught anymore either. I'm not sure if the two are related, but they did start happening around the same time.

这篇关于Visual Studio 2010不会捕获编译时的编译错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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