从VS 2003升级到VS 2005的Compact Framework 1应用程序打破了表单设计器?

时间:2021-01-06 16:38:42

I am trying to move a C# Compact Framework 1 application from Visual Studio 2003 to Visual Studio 2005 (no comments please on how outdated all this is :-)). I am now able to compile and run the app in VS 2005 just fine, however when I open one of the forms, the form designer does not show the actual form layout but just some rows of icons, one for each control on the form. I have no idea why, or how to get back the standard form designer view. Does anybody have any experience with that and any hints or tips?

我正在尝试将C#Compact Framework 1应用程序从Visual Studio 2003移动到Visual Studio 2005(请不要评论所有这些过时的内容:-))。我现在能够在VS 2005中编译和运行应用程序就好了,但是当我打开其中一个表单时,表单设计器不显示实际的表单布局,而只显示一些图标行,一个用于表单上的每个控件。我不知道为什么,或者如何取回标准表单设计器视图。有没有人有这方面的经验和任何提示或提示?

1 个解决方案

#1


Well some things changed while going from VS2003 to VS2005 one of those things is the way the form designer adds code to your Form class. It creates a separate .designer.cs class and creates a partial class with the same name as you main form class. All the designer generated code now goes in this background class. This is done so that the form designer generated code stays out of your hair.

从VS2003到VS2005,有些事情发生了变化,其中一个就是表单设计者将代码添加到Form类的方式。它创建一个单独的.designer.cs类,并创建一个与主表单类同名的部分类。所有设计器生成的代码现在都在这个后台课程中。这样做是为了使表单设计器生成的代码不受限制。

Now its plausible that the VS2005 designer no longer recognizes the in-file designer code generated by the previous version. You can try to create a new WinForms project and see how it differs from your current project then make appropriate amends to your current project.

现在看来,VS2005设计人员不再能够识别先前版本生成的文件内设计器代码。您可以尝试创建一个新的WinForms项目,看看它与当前项目的不同之处,然后对当前项目进行适当的修改。

#1


Well some things changed while going from VS2003 to VS2005 one of those things is the way the form designer adds code to your Form class. It creates a separate .designer.cs class and creates a partial class with the same name as you main form class. All the designer generated code now goes in this background class. This is done so that the form designer generated code stays out of your hair.

从VS2003到VS2005,有些事情发生了变化,其中一个就是表单设计者将代码添加到Form类的方式。它创建一个单独的.designer.cs类,并创建一个与主表单类同名的部分类。所有设计器生成的代码现在都在这个后台课程中。这样做是为了使表单设计器生成的代码不受限制。

Now its plausible that the VS2005 designer no longer recognizes the in-file designer code generated by the previous version. You can try to create a new WinForms project and see how it differs from your current project then make appropriate amends to your current project.

现在看来,VS2005设计人员不再能够识别先前版本生成的文件内设计器代码。您可以尝试创建一个新的WinForms项目,看看它与当前项目的不同之处,然后对当前项目进行适当的修改。