Reputation:
I have two Visual Studio solutions and in each one project. I have several functions in common between the two projects.
Actually the functions class is duplicate in both projects.
What is the best way to create another solution with a library project? And automatically referencing the dll in each project?
Upvotes: 0
Views: 49
Reputation: 390
You can create a third project containing your shared code. You do not necessarily have to create another solution for that project. Then you can include that project in both of your solutions, and reference the project (containing the shared code) in the projects where you want to use the code.
Your layout will then probably look something like this:
--> Solution A:
----> Project A
-------> Reference To "Project Shared"
----> Project Shared
--> Solution B:
----> Project B
------> Reference to "Project Shared"
----> Project Shared
If you then edit something in "Project Shared", it will be reflected in both of your solutions.
Upvotes: 1