I'm trying to write code for forms without using MS Designer.
When I compile, I'm consistently getting the same errors:
The type System.ComponentModel.* is defined in an assembly that is not referenced.
This will appear for IComponent, ISynchronizeInvoke, and Component. I think I have referenced it.
I've tried removing the reference and re-applying it, and switching to earlier versions of .net. It has to be something in my environment, but I cannot find it.
using System;
using System.ComponentModel;
using System.Windows.Forms;
public class EmptyForm : System.Windows.Forms.Form
{
public EmptyForm()
{
}
public static int Main()
{
Application.Run(new EmptyForm());
return 0;
}
}