sharing code between sharepoint projects RRS feed

  • Question

  • Hi,

    I have two share point portalsa) insidecompany b) outsidecompany

    they have code in single visual studio project and both their components are in the wsp file.

    how do i reuse the code of a into b or viceversa. how can i share code across.


    Monday, April 20, 2015 9:14 PM


All replies

  • You can create 2 projects in one single visual studio project and have a separate common API project that can be used for both your projects.


    Tuesday, April 21, 2015 5:07 AM
  • Thank you for answering me.

    Pls let me know if i want to divide this project into two different team(TFS) projects - how do i manage the code and share the code.

    2 separate Projects as 2 different Team Projects and Common API Project  as 3rd team project and then use 3rd team project as dll in both the projects.Is this a good  practise?

    What would you suggest?One team project with three projects .Or 3 different team projects and why? What would be the best practise to share the code in each approach..

    Thank you.


    Tuesday, April 21, 2015 2:07 PM
  • Hi,

    you can create a project with common issues, deploy it as dll and use that from other projects.


    If a post answers your question, please click Mark As Answer on that post and Vote as Helpful

    Tuesday, April 21, 2015 2:16 PM
  • You need to create 3 project in a one single solution. Use the 3rd API project that can be shared or reused. Build WSPs for the other 2 projects and deploy in respective environment.


    Wednesday, April 22, 2015 4:51 AM