开发者

Visual Studio 2008 to 2010 'fieldName' is not a member of

开发者 https://www.devze.com 2023-01-15 00:24 出处:网络
开发者_如何转开发I created a new project.I copied files from the original VS 2008 project into the new VS 2010 an used \"include\" in VS 2010.
开发者_如何转开发

I created a new project. I copied files from the original VS 2008 project into the new VS 2010 an used "include" in VS 2010.

I get an error saying "Error 108 Maximum number of errors has been exceeded."

It seems that EVERY field in the webforms\user-controls\ASCX's has the error message "fieldName' is not a member of".

I tried a delete the contents of the ASCX and ASCX.vb for a specific ASCX. Compiled and that page had no errors (although the other pages did). Copied back the contents ASCX and compiled (although the other pages did). That page had no errors. Added back the code-behind in the ASCX.vb and compiled. Same error. 'fieldName' is not a member of ...

They fieldName can be anything. Textboxes, hiddens, checkboxes, etc.

OK ... what am I doing wrong? I have spent hours on this I am hoping I am just missing something simple.


I also got the "Maximum number of errors has been exceeded" in VS2008/VB. Turns out I'd inadvertently included the default root namespace name when defining a new subordinate namespace (as if I was adding an imports statement - which I had been doing beforehand).

That one mistake causes all the types in the default root namespace to be undefined, hence easily exceeding the maximum number of errors.


This sounds like a namespacing issue.

Ensure your namespaces declared in your .vb files are in agreement with the containing project's default namespace (right click project->Properties).

Check the markup declaration as well. i.e. <%@ Page Language="VB" Inherits="foo.bar" %> as expected.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号