[英]How can I add System.Windows.Forms to WPF application when adding via reference/Depenency doesn't work?
Following every guide everywhere:随处遵循每个指南:
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:
我几乎没有进口或使用过任何东西:
Apparently this is due to using.Net Core and Microsoft couldn't anticipate that people would want to use forms in the new normal...显然这是由于使用.Net Core,微软无法预料到人们会想在新常态下使用 forms ...
I found this: How to use System.Windows.Forms in .NET Core class library我发现了这个: How to use System.Windows.Forms in .NET Core class library
This is what worked:这是有效的:
<PropertyGroup>
<TargetFramework>net6.0-windows</TargetFramework>
<UseWPF>true</UseWPF>
<UseWindowsForms>true</UseWindowsForms>
</PropertyGroup>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.