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通常会把它弄得一团糟。在整个解决方案中也这样做。