无法加载文件或程序集 'System.ComponentModel.TypeConverter'

Could not load file or assembly 'System.ComponentModel.TypeConverter'

我有一个 .Net Core 3.0 windows 桌面简单项目,它引用了以下 NuGet 包:

  1. Microsoft.NETCore.Platforms(3.0.0-preview.3.19128.7)
  2. Microsoft.WindowsDesktop.App(3.0.0-preview.3.27504-2)
  3. runtime.win-x64.Microsoft.NETCore.DotNetAppHost(3.0.0-preview3-27503-5)

当我向应用程序添加新表单时,出现以下错误:

无法加载文件或程序集 'System.ComponentModel.TypeConverter, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' 或其依赖项之一。系统找不到指定的文件

我使用 visual studio 2019 ,目标 .net core 3.0.

如何解决这个错误?

非常感谢任何帮助!

使用表单设计器时出现此错误

据此link

Visual Form Designer 尚不可用于 Windows Forms 和 WPF .NET CORE 项目。 但关于他们的路线图,设计师将作为 Visual Studio 2019 年更新的一部分提供。

可用此部分后,此错误也已修复。

编辑:

根据这个Link

要启用设计器,请下载并安装 Windows Forms .NET Core Designer VSIX package. 并将 Visual Studio 更新到 16.3.1 版本。

我已经解决了。

希望有用。

首先,从 https://github.com/dotnet/winforms

下载并安装 WinFormsDesigner

然后从命令行创建 WinForms 应用,而不是从 VS 中创建 (即在您选择的文件夹中打开 cmd 并键入:dotnet new winforms)

这是开发的早期阶段,WinForms Designer 在没有为我执行这些步骤的情况下也无法正常工作。