追踪间歇性“对象引用未设置到对象的实例。”错误的构建 [英] Tracking down intermittent 'Object reference not set to an instance of an object.' error on build

查看:144
本文介绍了追踪间歇性“对象引用未设置到对象的实例。”错误的构建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以利用一些帮助试图追查,我一直有与我们的ASP.Net项目相当一段时间的间歇性错误。

I could use some help trying to track down an intermittent error that I've been having with our ASP.Net project for quite some time.

间歇性地构建解决方案时,生成将失败,出现错误/:体形(网):对象引用不设置到对象的实例。该错误没有关联的文件,行,列或项目信息。有关错误的奇怪的是,它会消失在连续的重建似乎并没有导致我们已经遇到一旦构建成功的运行时错误。有时误差会弹出一次,有时候3-4次,但最终版本将成功完成,然后似乎在每次的时间来建立就好了。我一直没能敲定的模式,为什么以及何时会发生错误,并且由于它总是最终建立还没有对我们是个严重的问题。只是一个烦恼。但有我想要走了,原因很明显。

Intermittently when building the solution, the build will fail with the error "/: Build (web): Object reference not set to an instance of an object." The error has no associated file, line, column or project information. The weird thing about the error is that it will go away on successive rebuilds and doesn't seem to result in any run-time errors that we've come across once the build is successful. Sometimes the error will pop only once, sometimes 3-4 times, but eventually the build will finish successfully and then seems to build just fine each time after. I haven't been able to nail down a pattern as to why and when the error will happen, and since it always eventually builds it hasn't been a critical problem for us. Just an annoyance. But one that I want gone for obvious reasons.

我想我应该补充说,这是最初在ASP.net 1.1开发,并转换为2.0的应用程序,我继承了它某处后,该行,所以我不知道什么时候这个问题最初浮出水面。至于这里的每个人而言,它一直在那里。

I guess I should add that this is an application that was originally developed in ASP.net 1.1 and converted to 2.0 and I inherited it somewhere down the line after that, so I don't know when the problem originally surfaced. As far as everyone here is concerned, it's always been there.

显然,我不期待有人来接我的问题的原因,因为这将要求他们看看我们的整个解决方案挑选出潜在的问题。只是希望有人可以给我一对夫妇的新的想法,如何去跟踪误差的实际来源$ C ​​$ C。它是从什么地方来了,对不对?你会如何​​去寻找出在哪里?

Obviously I'm not expecting someone to pick out the cause of my problem as that would require them to look at our entire solution to pick out potential problems. Just hoping someone can give me a couple fresh ideas as to how to go about tracking down the actual source of the error in code. It has to be coming from somewhere, right? How would you go about finding out where?

推荐答案

我已经看到了这个,当你在一个页面里有无效的HTML网页控制。如果你的codebehind正在试图做一些与控制,这将无法找到它,并给你对象参考...错误在编译时。根据我的经验,它不创建一个运行时错误,如果有问题的文件在构建时关闭该项目将建成。心连心,祝你好运!

I've seen this when you have a web control in a page where there is invalid HTML. If your codebehind is trying to do something with the control, it won't be able to find it and will give you Object Reference... error at compile time. In my experience, it doesn't create a runtime error, and the project will build if the file in question is closed at the time of build. HTH, Good Luck!

这篇关于追踪间歇性“对象引用未设置到对象的实例。”错误的构建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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