所以,我必须使用C来进行uni课程,就像我必须使用MSSQL服务器一样,最大的问题是我运行的是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.

最佳答案

最新的.NET核心,2.1预览版2,does not include System.Windows.Forms
如果你想使用本地的Ubuntu运行时,Mono supports WinFormsSqlClient
有关详细信息,the .NET documentation explains how .NET is implemented

关于c# - 非Windows OS上的.NET Framework System.Windows.Form,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/50040559/

10-12 03:59
查看更多