美文网首页
如果我正在开发WPF项目,如何添加对WinForms的引用?

如果我正在开发WPF项目,如何添加对WinForms的引用?

作者: 价值投机168 | 来源:发表于2022-04-22 17:35 被阅读0次

在.Net内核中添加System.Windows.forms的引用

因此,我不得不将这一行添加到我的项目文件中:
<UseWindowsForms>true</UseWindowsForms>

比较完整的是:
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net5.0-windows</TargetFramework>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
<ApplicationIcon>Server.ico</ApplicationIcon>
<Authors>VeEX</Authors>
<Copyright>Copyright © VeEX 2022</Copyright>
<Company>VeEX</Company>
<ApplicationManifest>app.manifest</ApplicationManifest>
<RunPostBuildEvent>OnOutputUpdated</RunPostBuildEvent>
<UseWindowsForms>True</UseWindowsForms>
</PropertyGroup>

相关文章

网友评论

      本文标题:如果我正在开发WPF项目,如何添加对WinForms的引用?

      本文链接:https://www.haomeiwen.com/subject/vkmnertx.html