Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/.net/21.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/ssh/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# I';我最近在Visual Studio C中更改了自动生成的名称空间,现在是I';第0行和第0列出现错误_C#_.net_Winforms - Fatal编程技术网

C# I';我最近在Visual Studio C中更改了自动生成的名称空间,现在是I';第0行和第0列出现错误

C# I';我最近在Visual Studio C中更改了自动生成的名称空间,现在是I';第0行和第0列出现错误,c#,.net,winforms,C#,.net,Winforms,我最近更改了两个文件(GuiMenu.cs和GuiMenu.Designer.cs)中的名称空间(从MyProject.GuiMenu更改为GUI),但直到现在我才收到这样的警告: Warning 1 The designer could not be shown for this file because none of the classes within it can be designed. The designer inspected the following classes

我最近更改了两个文件(
GuiMenu.cs
GuiMenu.Designer.cs
)中的名称空间(从
MyProject.GuiMenu
更改为
GUI
),但直到现在我才收到这样的警告:

Warning 1   The designer could not be shown for this file because none of the classes within it can be designed.  The designer inspected the following classes in the file: 

PropetiesWindow --- The base class 'MyProject.GuiMenu' could not be loaded.  
Ensure the assembly has been referenced and that all projects have been built.
Line 0 Column 0

看起来VisualStudio不喜欢这个名称空间,正在尝试使用旧名称空间。怎么了?顺便说一下,最近我收到了这样的警告:找不到class
MyProject.GuiMenu.MyClass
。但是这个类存在于
GUI.MyClass
中,幸运的是这个警告已经消失了。PS:我试图从对象中删除bin和obj文件夹,但没有帮助。

您需要发布代码,搜索并替换MyProject.gui菜单。如果您不使用重构工具,并且在编译的代码上按正确的顺序进行重构,VS通常会把它弄得一团糟。在整个解决方案中也这样做。