在Visual Studio中添加对下载的dll的引用,并在Github中解析 [英] Add reference to a downloaded dll in Visual studio and resolve in Github

查看:240
本文介绍了在Visual Studio中添加对下载的dll的引用,并在Github中解析的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个在GitHub上同步的visual studio解决方案。我想添加一些dll到一个项目中。我将这些DLL下载到我的桌​​面上,然后右键单击项目并使用添加引用 - >浏览添加这些。然后我推送到存储库。
但是,当我的朋友从存储库获取更改时,它显示引用,但显示无法解析引用?如何确保dlls实际上被推送到存储库而不仅仅是路径。

I have a visual studio solution which is synced on GitHub. I want to add a few dlls to one of the project. I downloaded those dlls on to my desktop, then right click on project and added those using "Add Reference->Browse". Then I pushed on to the repository. But when my friend fetched the changes from the repository, it shows the reference, but says "could not resolve reference"? How do I make sure that the dlls actually get pushed to the repository and not just the path.

推荐答案

将文件夹添加到项目,添加dll,从新文件夹引用,并将文件夹提交给github。

Add a folder to the project, add the dlls, reference from the new folder, and commit the folder to github.

或者,如果dll可作为nuget包使用,则可以通过nuget安装它们,并确保在github中的项目中提交了packages文件夹。

Or, if the dlls are available as nuget packages you could install them through nuget and make sure the "packages" folder is committed with the project in github.

Metro Smurf指出,您也可以省略nuget packages文件夹并使用软件包恢复选项。以下是关于此选项的nuget文档的链接:软件包恢复

As Metro Smurf pointed out, you could also omit the nuget packages folder and use the package restore option. Here's a link to the nuget documentation on this option: Package Restore

这篇关于在Visual Studio中添加对下载的dll的引用,并在Github中解析的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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