VS2012 fails to detect unresolved references - by KeithGl

Status : 


Sign in
to vote
ID 777777 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 1/29/2013 8:45:00 AM
Access Restriction Public


References, such as event handlers, that are unresolved in the code behind are not detected at build time. They are picked up at run time as compiler errors. This is a web application project using .net 4 and C#.
Sign in to post a comment.
Posted by Microsoft on 4/19/2013 at 11:09 AM
If you go to Tools->Options then Project and Solutions->Web Projects, select "Warn before running web applications when there are errors in the error list" should solve your problem
Posted by Helen [MSFT] on 2/6/2013 at 12:13 AM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by KeithGl on 2/4/2013 at 2:12 AM
I have created a simple demo project:


<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="ErrorDemo.WebForm1" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <form id="form1" runat="server">
            <asp:TextBox ID="tbTest" runat="server" Text="My text" OnTextChanged="tbTest_TextChanged"
                AutoPostBack="true" />


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace ErrorDemo
    public partial class WebForm1 : System.Web.UI.Page
        protected void Page_Load(object sender, EventArgs e)


        protected void tbTest_TextChanged1(object sender, EventArgs e)


On build, although the reference cannot be resolved, no errors are reported and VS2012 reports build succeeded. This fails at run time.
Posted by Helen [MSFT] on 2/4/2013 at 1:33 AM

I am currently standing by for an update from you and would like to know how things are going on your end. If you could get back to me at your earliest convenience with information I request, we will be able to make headway towards a resolution. I look forward to hearing from you.
Posted by Helen [MSFT] on 1/29/2013 at 5:56 PM
I am having trouble reproducing your issue. Can you share a sample project on which you are seeing this problem?

Posted by Macy [MSFT] on 1/29/2013 at 8:50 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)