Visual Studio Developer Center > Visual Studio Team System Forums > Team Foundation Server - General > Building both SharePoint 2007 & SharePoint 2010 Projects

Answered Building both SharePoint 2007 & SharePoint 2010 Projects

  • Tuesday, May 03, 2011 12:49 PM
     
     

    How to build SharePoint 2007 & 2010 projects in the same TFS.  How should these SharePoint assemblies be referenced in the projects so no build issues?

Answers

  • Wednesday, May 04, 2011 6:54 AM
    Moderator
     
     Answered

    Hi MULTISY,

     

    Thanks for your post.

     

    If your SharePoint 2007 and 2010 projects in different solutions, I suggest you create two Build Definitions for them separately.

     

    To build solution using Team Build, we need to ensure that on TFS Build machine, the Team Build Service can find the required dlls.

    Additionally, to build solution using Team Build, we should ensure the following steps:

    1        The solution can be built completely on Build machine using VS.

    2        Ensure the your TFS Build Service account have the permission to build this solution on the Build machine.

    3        Ensure the solution can be built completely on Build machine using MS Build.

     

    We usually using the following two way to reference dlls when using Team Build:

          1 Create a Assemblies folder under Solution, and add all your dlls in this folder. After we check in the solution into TFS, the Team Build Service will get the solution from TFS to build on the Build machine, in this case, the Assemblies folder under solution will be get together. The structure like this:

                     TeamProject

                            /Solution1

                     /Assemblies

                     /Poject1

                     /Poject2

                     /…

                            /Solution2

                           

            2 Create the same common folder on the Build machine as you created on your client, and the folder path is same. So when the Team Build to build the solution on build machine, it will try to find the dlls on the Build machine follow the relative path which your set in your project.

     


    John Qiao [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.


     
  • Thursday, May 26, 2011 11:37 AM
     
     Answered
    Shared code is something TFS cannot do, while VSS allow this.  The idea would be to create three projects for each SharePoint version and share the source code, but this is not allowed in TFS.  Also have an issue using SharePoint sandbox where sharing source code would be useful as well but no joy.
    • Marked As Answer by MULTISY Thursday, May 26, 2011 11:37 AM
    •  

All Replies

  • Wednesday, May 04, 2011 6:54 AM
    Moderator
     
     Answered

    Hi MULTISY,

     

    Thanks for your post.

     

    If your SharePoint 2007 and 2010 projects in different solutions, I suggest you create two Build Definitions for them separately.

     

    To build solution using Team Build, we need to ensure that on TFS Build machine, the Team Build Service can find the required dlls.

    Additionally, to build solution using Team Build, we should ensure the following steps:

    1        The solution can be built completely on Build machine using VS.

    2        Ensure the your TFS Build Service account have the permission to build this solution on the Build machine.

    3        Ensure the solution can be built completely on Build machine using MS Build.

     

    We usually using the following two way to reference dlls when using Team Build:

          1 Create a Assemblies folder under Solution, and add all your dlls in this folder. After we check in the solution into TFS, the Team Build Service will get the solution from TFS to build on the Build machine, in this case, the Assemblies folder under solution will be get together. The structure like this:

                     TeamProject

                            /Solution1

                     /Assemblies

                     /Poject1

                     /Poject2

                     /…

                            /Solution2

                           

            2 Create the same common folder on the Build machine as you created on your client, and the folder path is same. So when the Team Build to build the solution on build machine, it will try to find the dlls on the Build machine follow the relative path which your set in your project.

     


    John Qiao [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.


     
  • Thursday, May 05, 2011 3:51 AM
    Moderator
     
     

    Hi MULTISY,

     

    What about the progress for this issue?


    John Qiao [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • Monday, May 09, 2011 12:46 PM
     
     

    Thank you,

    This structure helps.  Will need to gather the Referenced Assemblies in all of the SharePoint versions on different VMs.

  • Tuesday, May 24, 2011 6:53 PM
     
     

    Our solution is a bit more complex, in that the source code is used the create a Generic Handler for SharePoint 2003, 2007, & 2010.  The only difference is the Microsoft.SharePoint.dll referenced to compile.  Unsure how the build machine can do this?

    Manually building solutions is easy, since each runs in a VM with that target version of SharePoint, but very time consuming, and if any source code is changed in any version it must be tested against the other versions of SharePoint.

    Ideas would most helpful, thanks in advance.

     

  • Wednesday, May 25, 2011 2:36 AM
    Moderator
     
     

    Hi MULTISY,

     

    Thanks for your reply.

     

    For this scenario, I suggest you to  create a new post which have the detailed description and information about this issue in the forum, our engineers and members will handle it ASAP.


    John Qiao [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • Thursday, May 26, 2011 11:37 AM
     
     Answered
    Shared code is something TFS cannot do, while VSS allow this.  The idea would be to create three projects for each SharePoint version and share the source code, but this is not allowed in TFS.  Also have an issue using SharePoint sandbox where sharing source code would be useful as well but no joy.
    • Marked As Answer by MULTISY Thursday, May 26, 2011 11:37 AM
    •  
  • Friday, May 27, 2011 2:43 AM
    Moderator
     
     

    Hi MULTISY,

     

    Thanks for your reply.

     

    And thank you for sharing your experience here. It will be very beneficial for other community members having the similar questions.

     

    All your participation and support are very important to build such harmonious/ pleasant / learning environment for MSDN community.


    John Qiao [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.