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

问题描述 投票:0回答:1

我想写我的.resx文件。我使用过ResXResourceWriter,它在Windows窗体中运行良好但在.Net Core应用程序中不可用。它需要system.Windows.Forms但.net核心不引用它。

ResXResourceWriter resx = new ResXResourceWriter(hostingEnvironment.WebRootPath +“\ Localization \ LabelResource.EN.resx”)

c# asp.net .net .net-core
1个回答
2
投票

您目前需要使用.Net Core 3.0 Preview,因为System.Windows.Forms是.Net Core 3.0中的新功能。来自System.Windows.Forms repository

您可以使用以下命令使用dotnet new命令创建新的WinForms应用程序:

dotnet new winforms -o MyWinFormsApp
cd MyWinFormsApp
dotnet run
© www.soinside.com 2019 - 2024. All rights reserved.