Following every guide everywhere:
- Step 1:
- Step 2: it works! Huzzah! Except that it doesn't. Instead I get yellow triangles:
This project is tiny for now because I only just started. The guides about yellow triangles talk about conflicts which can't be the case here. I have next to nothing imported or used yet:
CodePudding user response:
Apparently this is due to using .Net Core and Microsoft couldn't anticipate that people would want to use forms in the new normal...
I found this: How to use System.Windows.Forms in .NET Core class library
This is what worked:
- Removed reference/dependancy entirely
- Right-click project, Unload
- Right-click project, Edit project file
- Add the following:
<PropertyGroup>
<TargetFramework>net6.0-windows</TargetFramework>
<UseWPF>true</UseWPF>
<UseWindowsForms>true</UseWindowsForms>
</PropertyGroup>
- Reload project file
- Add "using system.windows.forms" to the top.