I need to add a reference to System.Windows.Forms in class library project written in .net7.0 that will be distributed in NuGet for my young students. How can this be done? The class that I want to add to the project:
public class DebugApp
{
Form form;
TextBox textBox = new TextBox();
Button button = new Button();
Label label = new Label();
Panel panel = new Panel();
List<string> data = new List<string>();
.....
}
I Create Windows Forms Project, change it to class library in project properties, delete Form1 and Program.cs and it's working.