locked
Build error when building shared assembly in TFS. An error was encountered when processing operation RRS feed

  • Question

  • We have two solution. One wpf solution, and one web solution (wcf). One project is used in both solutions. When building at TFS server, we often get the following error

    log-file output:

    C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.targets(4377,5): warning : An error was encountered when processing operation 'Create File' on '<name>.Common.Entities.dll'.   [C:\Builds\14\<name>\2. Test.<name>Services\Sources\<name>Source\<name>.Server.WebServerHost\<name>.Server.WebServerHost.csproj]
    C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.targets(4377,5): warning : Retrying operation 'Update' on object filePath (Default Web Site/<name>Services\bin\<name>.Common.Entities.dll). Attempt 1 of 2. [C:\Builds\14\<name>\2. Test.<name>Services\Sources\<name>Source\<name>.Server.WebServerHost\<name>.Server.WebServerHost.csproj]
    C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.targets(4377,5): error : Web deployment task failed. ((02.08.2013 10:34:11) An error occurred when the request was processed on the remote computer.) [C:\Builds\14\<name>\2. Test.<name>Services\Sources\<name>Source\<name>.Server.WebServerHost\<name>.Server.WebServerHost.csproj]
    C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.targets(4377,5): error :  [C:\Builds\14\<name>\2. Test.<name>Services\Sources\<name>Source\<name>.Server.WebServerHost\<name>.Server.WebServerHost.csproj]
    C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.targets(4377,5): error : (02.08.2013 10:34:11) An error occurred when the request was processed on the remote computer. [C:\Builds\14\<name>\2. Test.<name>Services\Sources\<name>Source\<name>.Server.WebServerHost\<name>.Server.WebServerHost.csproj]
    C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.targets(4377,5): error : The stream data of 'C:\Builds\14\<name>\2. Test.<name>Services\Sources\<name>Source\<name>.Server.WebServerHost\obj\Test\Package\PackageTmp\bin\<name>.Common.Entities.dll' is not yet available. [C:\Builds\14\<name>\2. Test.<name>Services\Sources\<name>Source\<name>.Server.WebServerHost\<name>.Server.WebServerHost.csproj]
      Publish failed to deploy.
    Done Building Project "C:\Builds\14\<name>\2. Test.<name>Services\Sources\<name>Source\<name>.Server.WebServerHost\<name>.Server.WebServerHost.csproj" (default targets) -- FAILED.

    Anyone got an idea on how to get around this?


    Kjaps

    Friday, August 2, 2013 9:56 AM

Answers

  • Hi Kjaps, 

    Thanks for your post.  

    You’re using TFS 2012? If yes, you’re using TFS 2012 Update 2 or Update 3?

    You create two build definitions to build your wpf solution and wcf solution, both these two build definitions occurred the same issue when you queue them?

    That one project existing in your two solution folder separately, or this one project existing in a third folder, your two solutions just both reference it from that third folder?

    To build solution using Team Build 2012, we should ensure the following steps:

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

    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 MSBuild v4.0 command line manually. 

    Additionally, to build solution using Team Build, we need to ensure the Team Build Service can find the required dlls on build machine. 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 path which your set in your project.

    If your two solutions both need that one project, I suggest you branch that project into your two solution folders separately, then use/reference that project from solution folder directly. Like the below structure:

                            /wpf-Solution

                                   /Project

                                   /wpf-project

                                   /…

                            /wcf-Solution

                                   /Project

                                   /wcf-project

                                   /…

     


    John Qiao [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, August 5, 2013 6:08 AM
    Moderator
  • We need to also validate circular dependency also.

    Cheers KSR

    Monday, August 5, 2013 1:21 PM

All replies

  • Hi Kjaps, 

    Thanks for your post.  

    You’re using TFS 2012? If yes, you’re using TFS 2012 Update 2 or Update 3?

    You create two build definitions to build your wpf solution and wcf solution, both these two build definitions occurred the same issue when you queue them?

    That one project existing in your two solution folder separately, or this one project existing in a third folder, your two solutions just both reference it from that third folder?

    To build solution using Team Build 2012, we should ensure the following steps:

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

    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 MSBuild v4.0 command line manually. 

    Additionally, to build solution using Team Build, we need to ensure the Team Build Service can find the required dlls on build machine. 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 path which your set in your project.

    If your two solutions both need that one project, I suggest you branch that project into your two solution folders separately, then use/reference that project from solution folder directly. Like the below structure:

                            /wpf-Solution

                                   /Project

                                   /wpf-project

                                   /…

                            /wcf-Solution

                                   /Project

                                   /wcf-project

                                   /…

     


    John Qiao [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, August 5, 2013 6:08 AM
    Moderator
  • We need to also validate circular dependency also.

    Cheers KSR

    Monday, August 5, 2013 1:21 PM