Error:
The type or namespace name 'Forms' does not exist in the namespace 'System.Windows'
Code:
using System;
using System.Windows.Forms;
namespace SimpleCounter
{
public partial class Form1 : Form
{
int counter = 0;
public Form1()
{
InitializeComponent();
}
private void btnAdd_Click(object sender, EventArgs e)
{
counter++;
lblCounter.Text = counter.ToString();
}
private void btnSubtract_Click(object sender, EventArgs e)
{
counter--;
lblCounter.Text = counter.ToString();
}
private void btnGolden_Click(object sender, EventArgs e)
{
counter += 2;
lblCounter.Text = counter.ToString();
}
}
}
According to How do I add assembly references in Visual Studio Code? going to command palette and then typing NuGet: Add New Package and than typing using System.Windows.Forms should solve this but no options was found,
I am new to .NET and C# so this is very confusing for my first project.