VS2005 VB.NET WEB - variables not declared that are.
Posted on 2007-03-23
VS2005 SP1 VB.NET WEB Application
I have an application which is in devlopment and had no problem until today. Suddenly variables that are clearlr declared are flagged as not declared and I can no longer build the project. It appears ANY new code i add to the project sufferes this fate. So I will pick a simple example: In code behind I have.
Protected Function LoadUsers(ByVal CaseID As String) As Boolean
Dim strSelect As String = "SELECT USERNAME FROM CASEUSERS WHERE (CaseID =" & Trim(CaseID) & ") ORDER BY USERNAME ASC"
.SelectCommand = strSelect
In ASPX I have
<asp:SqlDataSource ID="dsCaseU" runat="server" ConnectionString="<%$ ConnectionStrings:CMSConnectionString %>"
SelectCommand="SELECT DISTINCT USERNAME FROM CaseUsers ORDER BY USERNAME ASC">
And doing a solution build I get:
E:\CMS.NET\CMSCaseBlog.aspx.vb(63,0): error BC30451: Name 'dsCaseU' is not declared.
E:\CMS.NET\CMSCaseBlog.aspx.vb(67,0): error BC30451: Name 'dListUsers' is not declared.
========== Build: 0 succeeded or up-to-date, 1 failed, 0 skipped ==========
Note these names are not highlighted in blue by intellisense.
Some background. The problem started this morning and I had the same as above except these variables WERE highlighted in blue in the code behind as not declared .
Out of frustration I de-installed VS2005 completely and re-installed it. I also upgraded to SP1. Now I get this result and still cannot move forward.
Am I missing somethning stupid?