命名空间“System.Windows”中不存在类型或命名空间名“Forms”(是否缺少程序集引用?) ——c#

原因:

新建项目为类库时,项目不会自动引用System.Windows.Forms,当我们使用命名空间System.Windows.Forms时,就会报这个错误

解决方法:

右键引用——添加引用——框架——搜索System.Windows.Forms添加即可

原文地址:https://www.cnblogs.com/eve612/p/14190644.html