无法将类型为“System.Windows.Forms.SplitContainer”的对象强制转换为类型“System.ComponentModel.ISupportInitialize”

解决办法:

在设计器代码中把4.0自动加上去的代码注释掉就行了。

 //((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).BeginInit();
  //((System.ComponentModel.ISupportInitialize)(this.splitContainer2)).EndInit();

按不同的版本进行条件编译

#if V2007
#else
((System.ComponentModel.ISupportInitialize)(this.scMain)).EndInit();
#endif