无法将 dll 程序集引用到 Visual Studio Code 项目 [英] Can't reference dll assembly to the Visual Studio Code project

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

问题描述

我正在用 C# 开发一个控制台应用程序,它需要在 Visual Studio Code(不是 Visual Studio!)中引用一些 dll 文件.我猜菜单中没有这样的选项,我什至尝试过 Nuget 包管理器,但它对我不起作用.我找不到任何关于此的教程.有经验的用户吗?

I am developing a console application in C# which requires some dll file to be referenced in Visual Studio Code(not Visual Studio!). There is no such option in menu I guess and I even tried Nuget package manager, but it does not worked for me. I cannot find any tutorial regarding this. Any experienced user?

推荐答案

您可以使用 dotnet-add reference CLI 命令,该命令提供了向项目添加项目引用的便捷选项.

You can use dotnet-add reference CLI command which provides a convenient option to add project references to a project.

示例:添加项目引用:

dotnet add app/app.csproj reference lib/lib.csproj

有关详细信息,请参阅.

For more information, refer this.

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

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