无法在设计模式下打开表单

Sha*_*500 2 c# infragistics winforms

当我打开表单时,我无法进入设计模式,我收到此错误:

The variable 'MonthViewCalendar'
    (internal 
        Infragistics.Win.UltraWinSchedule.UltraMonthViewSingle 
        MonthViewCalendar;)
is either undeclared or was never assigned. 
Run Code Online (Sandbox Code Playgroud)

知道为什么表单不进入设计模式吗?我正在使用VS 2010.

我试过 - 清理解决方案,重新启动VS并重新打开,但这并没有解决我的问题.

Dav*_*ord 7

有时您可能会发现项目文件丢失了文件需要在设计模式下打开的正确子类型.

修理:

  • 关闭VS,然后使用文本编辑器编辑项目".csproj"文件
  • 查找<Compile Include ="MyFile.cs">
  • 如果没有"<SubType> Form </ SubType>",则按如下方式重新添加

    <Compile Include ="MyForm.cs"> <SubType> Form </ SubType> </ Compile>