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

查看:69
本文介绍了无法将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天全站免登陆