'Form' is an ambiguous reference between 'System.Windows.Forms.Form' and 'Microsoft.SharePoint.Client.Form'

When I try to use the SharePoint 2013 Client Object model in Windows Application I was getting the following error.

"'Form' is an ambiguous reference between 'System.Windows.Forms.Form' and 'Microsoft.SharePoint.Client.Form'"

Reason is there is a conflict between ‘System.Windows.Forms.Form’ and ‘Microsoft.SharePoint.Client.Form’

Solution:
Just after  changing the code

To

public partial class MainForm : System.Windows.Forms.Form
    {
        public MainForm()
        {
            InitializeComponent();
        }

From 

public partial class MainForm : Form
    {
        public MainForm()
        {
            InitializeComponent();
        }

Problem fixed. 

Comments

Popular posts from this blog

ASP.NET website "Cannot read configuration file due to insufficient permissions" in IIS 7 and Windows Server 2008

Error occurred in deployment step 'Install app for SharePoint': The System Account cannot perform this action.

Embrassing screen sharing interview : SharePoint