Exception after upgrading .net compact framework version

十年热恋 提交于 2019-12-31 07:25:07

问题


I have upgraded my project from .NET 2.0 to .NET 3.5 through visual studio Project-> Upgrade Project . After upgrade when i compile the project i got the error

'The type 'System.Windows.Forms.DataGridTableStyle' exists in both 'c:\Users\VijayVignesh\Desktop\AGMobile4\Dll\Other\System.Windows.Forms.DataGrid.dll' and 'c:\Program Files (x86)\Microsoft.NET\SDK\CompactFramework\v3.5\WindowsCE\System.Windows.Forms.dll''.

Typically two dlls are refernced in my project System.Windows.Forms.dll and System.Windows.Forms.DataGrid.dll. So, i decided to remove System.Windows.Forms.DataGrid.dll from the project.

And when i run the project ,

public System.Windows.Forms.ImageList imgLstSplashScrn;

private void InitializeComponent()
{
    System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(SplashScreen));
    this.mainMenu1 = new System.Windows.Forms.MainMenu();
    this.picBxCompLogo = new System.Windows.Forms.PictureBox();
    this.lblWait = new System.Windows.Forms.Label();
    this.imgLstSplashScrn = new System.Windows.Forms.ImageList();
    this.SuspendLayout();

}

i get the exception 'Exception was unhandled' at 'this.imgLstSplashScrn = new System.Windows.Forms.ImageList();'

When i try to handle the exception on InitializeComponent() call , i get the exception 'ObjectDisposedException was unhandled'.

How do i solve it ??

来源:https://stackoverflow.com/questions/36256851/exception-after-upgrading-net-compact-framework-version

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!