Share via


Shared Project between solutions

Question

Tuesday, February 9, 2016 5:37 PM | 1 vote

I have a couple of shared projects which has all the common logic.We have really large codebase and we can't have all the projects into one solution.Now we have multiple solutions which need this projects. My question is how to reference these shared projects? I have following options 

  • Reference the shared project in all the solution- This is something which get the work done. It doesn't aligns with the physical file structure but has issues like any change in one solution can potentially break other solutions
  • Reference the project binaries-  This involves the referencing of assemblies of all the shared project. To make it more aligned we can have a common shared folder where the binaries can be dropped and then the binary is referenced in all the project
  • Shared project in  VS2015 - This is something I came across recently and it works great when in same solution but I cant really find way to reference it in different solution.
  • NuGet between solution - We can share the nuget package between solution but its has a maintainablity curve where someone needs to maintain a NuGet Server

My question is which is the best way to really solve this kind of issue? Its something which every developer has experienced when managing a large codebase but I didn't find any best practice around this issue although there are several workarounds.

All replies (5)

Wednesday, February 10, 2016 4:13 PM âś…Answered

Hi AnupKumar,

Thanks for sharing different workarounds for share projects' references.

Every members have his own good chose, so maybe no one is the best, just the one you are good at.

For example, we often use the extension tool "Shared Project Reference Manager" for share projects references in VS2013:

https://visualstudiogallery.msdn.microsoft.com/315c13a7-2787-4f57-bdf7-adae6ed54450

But it seems that no VS2015 version, in VS2015, we often add it like the following screen shot.

Best Regards,

Jack

We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.


Thursday, February 18, 2016 4:51 AM

So using the shared feature in VSTS - 2015, can we share the projects (shared) across solution ?


Thursday, February 18, 2016 10:27 AM

@AnupKumar,

I test it my VS2015 IDE, it seems that it has a limitation for this issue, I couldn't add the share project as the reference in another solution directly.

Thanks,

Jack

We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.


Thursday, January 18, 2018 2:41 PM

This feature is missing in visual studio 2017 Enterprise :(


Friday, January 19, 2018 1:28 AM

Hi ArtiPrinted,

Since this case was closed for a long time, if possible, you could open a new case in this forum, my team members would follow up your issue as soon as possible.

Sincerely,

Jack

MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact [email protected].