Visual Studio Developer Center > Visual Studio Team System Forums > Team Foundation Server - Build Automation > Team Build 2008 with Web Application Projects does not copy deep references to "_PublishedWebsites" folder

Answered Team Build 2008 with Web Application Projects does not copy deep references to "_PublishedWebsites" folder

  • Monday, December 20, 2010 10:49 AM
     
     
    When building (Team Build 2008) a solution that includes a Web Application Project, a "_PublishedWebsites" folder is created in the $(BinariesRoot) folder. Now the problem that comes up is that not all required references are copied to the bin folder(s) of the Web Application Projects in the "_PublishedWebsites" folder. The missing references are always references coming from a fixed file reference that's part of a project which is a project references in the Web Application Project ...

    In detail the solution setup:
    • Project A is a C# Class Library Project which has a file reference to assembly X
    • Project B is a web application project which has a project reference to Project A
    When I build locally inside Visual Studio, assembly X is part of the bin folder of Project B --> OK
    When the solution is built with Team Build on the Build Server, assembly X is not copied to the bin folder of Project B in the "_PublishedWebsites" folder --> not OK

    I already examined the Microsoft.WebApplication.targets file, but wasn't able to pinpoint the problem. Printing the @(ReferenceCopyLocalPaths) ItemGroup doesn't list assembly X which is why the assembly is not found in the build folder. I have no idea in which other targets file(s) this ItemGroup is set and which conditions are relevant.

    Anyone experienced this behavior? Any decent solutions to fix this?

    Best regards,

    Pieter Gheysens.

Answers

  • Tuesday, December 28, 2010 9:34 AM
    Moderator
     
     Answered

    Hello Pieter,

    Sorry that it seems to be a limitation in MSBuild. Please take a look of this link. Although it refers to VS 2005, from my testing, it is still valid in VS 2010. 

    If you build the solution by msbuild locally, you will find that the secondary reference assembly doesn't copy to bin directory, neither. Even in VS, if you look into the msbuild diagnostic log file, you will find there is no entry indicating that VS is copying the referenced file to bin folder. VS copied the file out of the msbuild procedure. 

    The suggested way to fix the error is to reference all the secondary references in web application project. 

    Hope it helps.


    Hongye Sun [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.

All Replies