非Windows操作系统上的.NET框架System.Windows.Form

时间:2018-04-26 10:23:26

标签: c# .net linux

所以,我必须使用C#进行单一课程,就像我必须使用MSSQL Server一样,最大的问题是我正在运行Ubuntu。我跟着this指南,我的意思是它来自微软对吗?无法使用任何System.Windows.Form,无论是SqlDataAdapter还是其他更多(如99.65%的库)。 有没有人遇到过这个问题?或者您刚刚创建了一个虚拟机并等待一周时间进行Visual安装?

这是我运行dotnet run

时得到的结果
Program.cs(4,22): error CS0234: The type or namespace name 'Forms' does not exist in the namespace 'System.Windows' (are you missing an assembly reference?) [/home/potra/Desktop/School/School/DBMS/Test/Test.csproj]
Program.cs(8,28): error CS0246: The type or namespace name 'Form' could not be found (are you missing a using directive or an assembly reference?) [/home/potra/Desktop/School/School/DBMS/Test/Test.csproj]
Program.cs(10,17): error CS0246: The type or namespace name 'DataGridView' could not be found (are you missing a using directive or an assembly reference?) [/home/potra/Desktop/School/School/DBMS/Test/Test.csproj]
Program.cs(11,17): error CS0246: The type or namespace name 'DataGridView' could not be found (are you missing a using directive or an assembly reference?) [/home/potra/Desktop/School/School/DBMS/Test/Test.csproj]
Program.cs(12,17): error CS0246: The type or namespace name 'SqlDataAdapter' could not be found (are you missing a using directive or an assembly reference?) [/home/potra/Desktop/School/School/DBMS/Test/Test.csproj]

The build failed. Please fix the build errors and run again.

1 个答案:

答案 0 :(得分:0)

最新的.NET Core,2.1 Preview 2,does not include System.Windows.Forms

如果您想使用原生Ubuntu运行时,Mono supports WinFormsSqlClient

有关详细信息,请the .NET documentation explains how .NET is implemented