Click here to Skip to main content
16,018,294 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have changed the rootnamespace of my Project1 to Libraymangement
but Now I got these errors

Error 82 '_adapter' is already declared as 'Private WithEvents _adapter As System.Data.SqlClient.SqlDataAdapter' in this class.

Error 87 '_adapter' is already declared as 'Private WithEvents _adapter As System.Data.SqlClient.SqlDataAdapter' in this class.

Error 98 '_backupDataSetBeforeUpdate' is already declared as 'Private _backupDataSetBeforeUpdate As Boolean' in this class.

Error 94 '_classMasterTableAdapter' is already declared as 'Private _classMasterTableAdapter As ClassMasterTableAdapter' in this class.


many are there like this.. These only comes after changing the root namespace...
My project was running very properly... but these errors...
please help
Posted

Your problem is clearly explained in the message:
'_adapter' is already declared as 'Private WithEvents _adapter As System.Data.SqlClient.SqlDataAdapter' in this class.

What does it mean?
It means that in the class, you (or the Visual Studio designer, for auto-generated files) have declared two variables with the same name ('_adapter' in this case).

Solution:
- Open the {ClassName}.Designer.cs file.
- Search for every duplicate variable declaration (variable names should be highlighted in the designer; the only thing you have to do is watching for those who cause problems).
- Every variable should have one, and only one, declaration.
- Check in every file of the project that it has its namespace declaration updated.
 
Share this answer
 
Make sure that in all your classes and modules that your namespace is changed to "Libraymangement" and not the previous namespace,

Also make sure that you do not have double references...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900