如何使用 Visual Studio Code 引用程序集? [英] How to reference assemblies using Visual Studio Code?

查看:23
本文介绍了如何使用 Visual Studio Code 引用程序集?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在我正在 OSX 上使用 Visual Studio Code 编写的控制台应用程序中引用 System.Drawing.dll.即我想使用这些 using 语句

I would like to reference the System.Drawing.dll in a console app I am writing using Visual Studio Code on OSX. i.e. I want to use these using statements

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 core 或 mono 或任何visual-studio-code 使用的东西.

I can't find a tutorial on this, I don't even know if the dll is available in .net core or mono or whatever visual-studio-code uses.

推荐答案

新的 .NET Core SDK 恢复命令是 dotnet restore

The new .NET Core SDK restore command is dotnet restore

要在 Visual Studio Code 中添加任何程序集引用,请参阅我的帖子.

To add any asssembly reference in Visual Studio Code, please refer to my post.

这篇关于如何使用 Visual Studio Code 引用程序集?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆