根名称空间已更改 [英] Root Namespace Changed

查看:66
本文介绍了根名称空间已更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将Project1的rootname空间更改为Libraymangement

但是现在我收到了这些错误



错误82'_adapter'已在此类中声明为'Private WithEvents _adapter As System.Data.SqlClient.SqlDataAdapter'。



错误87'_adapter'已在此类中声明为'Private WithEvents _adapter As System.Data.SqlClient.SqlDataAdapter'。



错误98'_backupDataSetBeforeUpdate'已在此类中声明为'Private _backupDataSetBeforeUpdate As Boolean'。



错误94'_ classMasterTableAdapter'已在此类中声明为'Private _classMasterTableAdapter As ClassMasterTableAdapter'。




很多都有这样的..这些只是在更改根命名空间后...

我的项目运行得非常正常...但是这些错误...

请帮助

解决方案

您的问题在消息中有明确说明:

'_ adapter'已在此类中声明为'Private WithEvents _adapter As System.Data.SqlClient.SqlDataAdapter'。



这是什么意思?

这意味着在类中,您(或Visual Studio设计器,对于自动生成的文件)声明了两个具有相同名称的变量(' _adapter'在这种情况下)。



解决方案:

- 打开 {ClassName} .Designer.cs 文件。

- 搜索每个重复的变量声明(变量名称应该在设计器中突出显示;你唯一要做的就是观察那些导致问题的人)。

- 每个变量都应该有e 一个,只有一个声明。

- 检查项目的每个文件是否更新了其命名空间声明。


确保在您的所有类和模块中将命名空间更改为Libraymangement而不是之前的命名空间,



同时确保您没有双重命名空间引用...

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

解决方案

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.


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...


这篇关于根名称空间已更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆