Add reference to a downloaded dll in Visual studio

2019-08-14 20:26发布

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.

1条回答
Melony?
2楼-- · 2019-08-14 20:58

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

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.

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

查看更多
登录 后发表回答