Exception after upgrading .net compact framework version

242 Views Asked by At

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 ??

0

There are 0 best solutions below