Build errors appear when debugging: 'variable' is not declared. It may be innaccessible due to its proection level.

  • Thread starter Thread starter AleHu
  • Start date Start date
A

AleHu

Guest
I was using visual studio 2017 and my vb.net code was running just fine. Then I had to reinstall VS2017 and from that moment on I get the following message: There were build errors. Would you like to continue and run the las succesful build?

When I look at the errors in the error list, I see the following:

BC30451 "i" is not declared. It may be inaccessible due to its protection level.

For i = 0 to list.count -1

I know that conventionally I should use: Dim "i" as integer. In fact if I do that the error dissappears. But I don't want to do that since I know that before reinstalling it was working fine as it was, and also I have the same error about 200 times over the whole project.

I think that it has to do with some settings that recognize "For... Next" routines as integers, but I have already looked everywhere in the settings and I haven't found the way to solve it.

Has anybody experienced this before?

Thanks in advance for the help!

Continue reading...
 
Back
Top