havakok
havakok

Reputation: 1247

Use reference from another project at the same solution

I have a c# solution with a number of projects. One project, is sort of a tool for the others let us call it tool. It is compiled into tool.dll which in turn is referenced in other projects in the solution (project A and B for example). Inside tool project I have a reference to an external dll, foo.dll.

If I need to use methods that are defined in foo.dll inside project A, can I do it via the reference to tool.dll? I know I can add foo.dll to each project, but than if it has a new version I need to update it manually for each project and that is what I am trying to avoid.

In general, I want to avoid adding foo.dll to each project and somehow add it to only one place and share it. If it is at all possible, Is there another way to go about it?

I dont know if it is of any importance, but I am using visual studio 2010 with .NET framework 4.

Upvotes: 0

Views: 1471

Answers (1)

Milnev
Milnev

Reputation: 105

You could place foo.dll in a central place (location on disk, like C:\Tools\foo.dll) and reference the same file from each project.

To prevent having to manually update the references for every update, you could try wrapping foo.dll in a nuget package (if it's not available on NuGet.org already). That way you can let nuget handle the updates.

Upvotes: 1

Related Questions