受欢迎的博客标签

error:

System.Text.Encoding.CodePages missing in netstandard2.0  with Winform  

slove:

in winform:

Install-Package System.Text.Encoding.CodePages

using System;

using System.Text;

using System.Collections.Generic;

using System.Windows.Forms;

namespace Stock2008

{

static class Program {

/// <summary>

///应用程序的主入口点。

/// </summary>

[STAThread] static void Main()

{

//注册编码提供程序

Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);

Application.EnableVisualStyles();

Application.SetCompatibleTextRenderingDefault(false);

Application.Run(new StockMainForm());

} }}.