I have a question related to the error on the title. Im working with c# and Visual Studio 2010.
I have a form declared as \"public class FormularioGeneral : Form\",
In my case, I had an older Windows Forms project where InitializeComponents() started like this:
private void InitializeComponent()
{
var componentResourceManager = new ComponentResourceManager(typeof(MyForm));
...
This resulted in an error message later on when accessing the componentResourceManager inside InitializeComponent():
The variable 'componentResourceManager' is either undeclared or was never assigned.
When comparing with a newly created form, I saw that it was similar to my non-working form, except for one thing:
The variable was not named componentResourceManager but simply resources.
After doing a rename on my variable to also have the name resources, everything works successfully:
private void InitializeComponent()
{
var resources = new ComponentResourceManager(typeof(MyForm));
...
The Windows Forms Designer in Visual Studio 2017 did open the form correctly.