如何使用Visual Studio代码引用程序集?
我想在我在OSX上使用Visual Studio Code编写的控制台应用程序中引用System.Drawing.dll。 即我想使用这些使用语句
using System.Drawing; using System.Drawing.Imaging;
避免这种构建错误
Program.cs(56,20): error CS0246: The type or namespace name `Bitmap' could not be found. Are you missing an assembly reference?
我找不到这方面的教程,我甚至不知道dll是否可用.net核心或单声道或者任何visual-studio-code使用。
新的.NET Core SDK还原命令是dotnet还原
要在Visual Studio代码中添加任何asssembly引用,请参阅我的post 。
在.csproj文件中,将您的依赖项添加为ItemGroup
的PackageReference
,然后运行dotnet restore
或nuget restore
。 例:
2.3.1
请查看本文以获得完整的解释。
Mono提供了一个可以利用的WinForms管道实现 ,包括对System.Drawing
支持。