Monday, October 1, 2012

'Settings' is not a member of 'My'

Okay, so my project has been beating me over the head with this:
'Settings' is not a member of 'My'
webconfig was properly built.
tested other projects worked fine as the code was copied from them

So I was have a big wtf at this problem, as a generic error I was not finding any solution.
I found one post where the user created a new page in the same project, copied everything over and it worked, so I tried that, and it worked... here's the rundown of what I did....
 I am using Visual Studio 2012.

  • default.aspx - bad
  • default.aspx.vb - bad
  • default1.aspx - new
  • default1.aspx.vb - new
  1. blanked out the contents of both bad files
  2. copy pasted contents(code view of aspx file) of both to new files
  3. deleted  bad files via solution explorer
  4. renamed new files to bad file names (ie removed the 1 from the file name)
  5. my.settings references are working along with several other reference errors I was going to look at once i fixed the my.settings error.
or so I thought it was fixed...on compile it just blew up again on me

so I created a whole new  project. replicated steps above to transfer code, worked out several items that broke but were obvious fixes, and viola, 'my' errors went away.
Truth be told i had tried this before, but I think i had done File>New>Website... this last time round, I did File>New>Project

No comments:

Post a Comment