Migrated a VS2010 project into VS2019 Community, went well except for 640 errors similar to this:
Error BC30451 'CommandType' is not declared. It may be inaccessible due to its protection level.
If I include
Imports System.Data the error in that module goes away, however the imports statement is dimmed and the IDE says it is unnecessary. If I add
Data.CommandType the error also goes away, but then the IDE suggests that
Data. in unnecessary.
In project properties -> references -> Imported Namespaces, System.Data is checked.
In VS2010 the System.Data namespace was apparently global to my project since I did not need to import it in each module, and it looks like VS2019 is trying to do the same. I don't mind having to import the namespaces but the IDE is giving me conflicting information.
Is this a known issue or do I need to make a change to some global setting in my project?