Berryl
Berryl

Reputation: 12833

building a dll for another Visual Studio solution

What I want to do is have the ability to update a class library from one Visual Studio solution and have it available for other solutions in an automated way.

I don't know any build scripting tools (ie, nant) and I'm not sure that I need to in order to do this. As a Nuget user I kind of know you can publish something that way but not how to do so.

I sure would like to minimize the time and effort spent on any tools, even though it is likely to be useful knowledge. Can someone give me some practical suggestions to do this?

Cheers,
Berryl

Upvotes: 1

Views: 144

Answers (1)

Mark Pim
Mark Pim

Reputation: 10064

You can add the same project to multiple VS solutions. If you save the project in one solution and switch to another solution which references it, Visual Studio should prompt you that the project has been modified and would you like to reload it.


If you don't want to include the project in multiple solutions (probably wise if number of solutions > ~2) then a rebuild will suffice. For example, if you have two solutions:

Solution A

  • Contains the shared class library

Solution B

  • References the shared class library in the same way you'd reference any other external assembly (like log4net)

Then to propagate changes to the shared library from Solution A simply build Solution A (Ctrl+Shift+B). Now when you switch to Solution B the changes should get automatically picked up (IntelliSense knows about new properties etc.)

Upvotes: 2

Related Questions