2

I am getting the following error in the error list of an ASP.NET web site opened in visual studio 2012.

enter image description here

And in the Error window there is no line number/file name and clicking on the error does not take me to a line of code.

enter image description here

This is a compile time, not runtime error. The code runs fine on the web server and used to work in VS2005 (on another computer until the drive failed). I just can't get it working in 2012.

Your help is greatly appreciated.

7
  • That's a runtime error not a compile time error. Try setting your compiler to break on exceptions. Commented Jun 13, 2014 at 13:53
  • @Liath This is a website not a web application project (no project file), where do I set this option? Commented Jun 13, 2014 at 13:58
  • In VS go to the menu then Debug, exceptions and it's the inner rows of checkboxes. When debugging your compiler will break when the exception is hit rather than when it's caught. Commented Jun 13, 2014 at 13:59
  • 2
    @Liath this error is from the asp_net compiler, and a bug prevents Visual Studio from treating it as an error. I think it's a valuable question for our site and folks shouldn't be downvoting simply because they see "object reference not set to an instance of an object", making it easy to assume it's an inappropriate novice question. Commented Sep 26, 2015 at 8:08
  • 1
    @RegEdit thanks for the clarification, glad they got an answer. However I wasn't the downvoter... Commented Sep 27, 2015 at 7:46

1 Answer 1

3

I've had this in the past and it turned out Visual Studio was reporting an aspnet_compiler error as a "warning". Go to the Error List pane, and at the top there are toggle buttons for Error and Warning. Hit the Warning button till it shows you all the warnings, and you may well find the answer there.

It's also sometimes useful to run aspnet_compiler.exe from the command prompt, to see the output independently from the Visual Studio build.

Sign up to request clarification or add additional context in comments.

1 Comment

I'm getting that, too, and the Warnings aren't telling me much; if interested, see Update 7 at stackoverflow.com/questions/40875865/…

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.