Team System Developer Center > Visual Studio Team System Forums > Team Foundation Server - Build Automation > TeamBuild Fails when building Solution with EntLib 2.0 projects.
Ask a questionAsk a question
 

AnswerTeamBuild Fails when building Solution with EntLib 2.0 projects.

  • Tuesday, April 04, 2006 2:01 PMDeanHuff Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    My ultimate goal is to have a continuous integration build but I'm not there yet.  My current solution has the Enterprise Library 2.0 projects added to the solution.  I then have project level references to the entlib projects for the various custom app blocks I've written.

    When I run the TeamBuild, I get 4 errors relating to the length of the file or path.  All of the errors appear to be located in the enterprise library proejcts.  When I run msbuild against the TFSBuild.proj file everything works fine.  Below is the contents of the ErrorsAndWarningsLog.txt.  Is there any workaround for this error?  Does it make sense that the build is successful using MSBuild but not throught he TeamBuild?

    Solution: EAF.sln, Project: Data.Configuration.Design.csproj, Configuration: Debug, Any CPU
    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets(1535,9): error MSB3021: Unable to copy file "ConnectionStringsSectionNode.bmp" to "obj\Debug\Microsoft.Practices.EnterpriseLibrary.Data.Configuration.Design.ConnectionStringsSectionNode.bmp". The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.

    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets(1535,9): error MSB3021: Unable to copy file "ConnectionStringSettingsNode.bmp" to "obj\Debug\Microsoft.Practices.EnterpriseLibrary.Data.Configuration.Design.ConnectionStringSettingsNode.bmp". The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.

    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets(1535,9): error MSB3021: Unable to copy file "OracleConnectionElementNode.bmp" to "obj\Debug\Microsoft.Practices.EnterpriseLibrary.Data.Configuration.Design.OracleConnectionElementNode.bmp". The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.

    C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.Common.targets(2843,9): error MSB3541: Files has invalid value "obj\Debug\Microsoft.Practices.EnterpriseLibrary.Data.Configuration.Design.ConnectionStringsSectionNode.bmp". The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.

    Thanks for any help you can provide.

     

     

Answers

  • Monday, May 08, 2006 8:25 AMManish Agarwal Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

     

    Dean,

    As mentioned in the error message, your project is failing inside teambuild because the path to bmp file is too long.

    why fail inside team build only?

    In team build the build happens under the folder specified by property "SolutionRoot". The default value of SolutionRoot property is $(MSBuildProjectDirectory)\..\sources where the $(MSBuildProjectDirectory) points to the location of tfsbuild.proj file. 

    According to team build convention the MSBuildProjectDirectory property is calculated as  $(BuildLoction)\$(TeamProjectName)\$(BuildTypeName)\BuildType.

    Now for your case, it looks like the value of $(SolutionRoot) + obj\bin\_yourBMPfile >260 chars  

    Workaround

    Can you edit your tfsbuild.proj file and override the SolutionRoot and BinariesRoot property?

    i.e something short like -  

    <SolutionRoot Condition="'$(IsDesktopBuild)'!='true' ">d:\temp\Sources</SolutionRoot>

    <BinariesRoot Condition="'$(IsDesktopBuild)'!='true' ">d:\temp\Binaries</BinariesRoot>

    This will replace $(BuildLoction)\$(TeamProjectName)\$(BuildTypeName)\BuildType\..\sources to d:\temp.

    Thus the combine path length will be less than 260 char.

    Note that the above change will only impact non destop team build sceanrios.

     

    Hope it helps  

     

All Replies

  • Monday, May 08, 2006 8:25 AMManish Agarwal Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

     

    Dean,

    As mentioned in the error message, your project is failing inside teambuild because the path to bmp file is too long.

    why fail inside team build only?

    In team build the build happens under the folder specified by property "SolutionRoot". The default value of SolutionRoot property is $(MSBuildProjectDirectory)\..\sources where the $(MSBuildProjectDirectory) points to the location of tfsbuild.proj file. 

    According to team build convention the MSBuildProjectDirectory property is calculated as  $(BuildLoction)\$(TeamProjectName)\$(BuildTypeName)\BuildType.

    Now for your case, it looks like the value of $(SolutionRoot) + obj\bin\_yourBMPfile >260 chars  

    Workaround

    Can you edit your tfsbuild.proj file and override the SolutionRoot and BinariesRoot property?

    i.e something short like -  

    <SolutionRoot Condition="'$(IsDesktopBuild)'!='true' ">d:\temp\Sources</SolutionRoot>

    <BinariesRoot Condition="'$(IsDesktopBuild)'!='true' ">d:\temp\Binaries</BinariesRoot>

    This will replace $(BuildLoction)\$(TeamProjectName)\$(BuildTypeName)\BuildType\..\sources to d:\temp.

    Thus the combine path length will be less than 260 char.

    Note that the above change will only impact non destop team build sceanrios.

     

    Hope it helps  

     

  • Tuesday, October 03, 2006 3:59 AMUttam5555 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Hi,

           I have a similar issue as well. I am not sure why does the EntLib behave so funny. if we try to add the numbers together, I dont even exceeed the 260 mark. rather i am at 168 characters but i still get this error. i dont understand why w3e have to do a dodgy fix to hardcode the path of the folder.

    Guys anyone out there has a genuine proper reason why we have this error, Please respond.

    Regards

    Uttam Jha

  • Wednesday, November 01, 2006 2:24 PMWole Ogunremi Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    I am getting the same error but I don't have a <SolutionRoot /> or <BinaryRoot /> defined in the tfsbuild.proj file.

    Any ideas?

  • Thursday, July 31, 2008 4:27 AMbruce durbin Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    copy entire project to new folder called c:/share and build/publish it there -- odds are high it'll work fine.