Team System Developer Center > Visual Studio Team System Forums > Team Foundation Server - Build Automation > Please, some solution to The specified path, file name, or both are too long
Ask a questionAsk a question
 

AnswerPlease, some solution to The specified path, file name, or both are too long

  • Friday, February 22, 2008 5:57 PMeferreyra Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi people, im setting here my first complex project in a TFS and setting the build automation always fails with this error in several places:

    I cant belive that in a 2008 environment i run in path too long exceptions, what is the solution for this, and please not say reduce my solution/projects names, i read something about modify the TFSBuild.proj, something about changing the $(SolutionRoot) but i cant find how to change this and where inside the file, also i need a solution for all my Team Projects...

    Please post some right solution to the problem.

    Thanks!


    C:\WINDOWS\Microsoft.NET\Framework\v3.5\Microsoft.Common.targets(3619,43): error MSB4023: Cannot evaluate the item metadata "%(FullPath)". The item meta-data "%(FullPath)" cannot be applied to the path "obj\Release\ConMega.Juridico.Desktop.BaseUserControls.dll". 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\v3.5\Microsoft.Common.targets(3619,43): error MSB4023: Cannot evaluate the item metadata "%(FullPath)". The item meta-data "%(FullPath)" cannot be applied to the path "obj\Release\ConMega.Juridico.Desktop.BaseUserControls.dll". 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\v3.5\Microsoft.Common.targets(3619,43): error MSB4023: Cannot evaluate the item metadata "%(FullPath)". The item meta-data "%(FullPath)" cannot be applied to the path "obj\Release\ConMega.Juridico.Desktop.BaseUserControls.dll". 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\v3.5\Microsoft.Common.targets(3012,9): error MSB3491: Could not write lines to file "obj\Release\ConMega.Juridico.Services.ConsoleServer.csproj.FileListAbsolute.txt". 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\v3.5\Microsoft.Common.targets(3246,9): error MSB3491: Could not write lines to file "obj\Release\ConMega.Juridico.Services.ConsoleServer.csproj.FileListAbsolute.txt". 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\v3.5\Microsoft.Common.targets(1660,9): error MSB3554: Cannot write to the output file "obj\Release\ConMega.Juridico.WinFormServiceManager.AboutBox.resources". 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\v3.5\Microsoft.Common.targets(1660,9): error MSB3554: Cannot write to the output file "obj\Release\ConMega.Juridico.WinFormServiceManager.ServiceManagerForm.resources". 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\v3.5\Microsoft.Common.targets(1660,9): error MSB3554: Cannot write to the output file "obj\Release\ConMega.Juridico.WinFormServiceManager.Properties.Resources.resources". 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\v3.5\Microsoft.Common.targets(0,0): warning MSB3101: Could not write state file "obj\Release\ConMega.Juridico.WinFormServiceManager.csproj.GenerateResource.Cache". 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\v3.5\Microsoft.Common.targets(3067,9): error MSB3541: Files has invalid value "obj\Release\ConMega.Juridico.WinFormServiceManager.csproj.GenerateResource.Cache". 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.

Answers

  • Saturday, February 23, 2008 10:28 AMeferreyra Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    I install from TFS 2008, i search more and find this:

    http://blogs.msdn.com/aaronhallberg/archive/2007/06/20/team-build-and-260-character-paths.aspx

    So is the way you say, i go in Team Explorer to my project, Builds, right click, manage build agents and in edit of buid agent i change the working directory to :

    E:\TMPBUILD\$(BuildDefinitionId)

    Before (default) was $(Temp)\$(BuildDefinitionPath) before, been Temp a very long path to the users temp dir in windows...

    This solves the problem for now, i think i need to define some envirnment variable like TMPBUILD=E:\TMPBUILD and change to $(TEMPBUILD)\$(BuildDefinitionId)

    Some other idea ?


All Replies

  • Friday, February 22, 2008 7:56 PMa.NETicated_ Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    eferreyra,

    Other than changing the project or solution name, you can move the entire solution to a root directory, like C:.  If it is already there, you have no choice but to shorten the project or solution name.

    Hope this helps,


    Steve - www.platinumbay.com
  • Friday, February 22, 2008 10:50 PMCraig Campbell Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    What version of TeamBuild are you running?  That will make a difference on where you change the SolutionRoot property.

     

    --Craig

  • Saturday, February 23, 2008 10:28 AMeferreyra Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    I install from TFS 2008, i search more and find this:

    http://blogs.msdn.com/aaronhallberg/archive/2007/06/20/team-build-and-260-character-paths.aspx

    So is the way you say, i go in Team Explorer to my project, Builds, right click, manage build agents and in edit of buid agent i change the working directory to :

    E:\TMPBUILD\$(BuildDefinitionId)

    Before (default) was $(Temp)\$(BuildDefinitionPath) before, been Temp a very long path to the users temp dir in windows...

    This solves the problem for now, i think i need to define some envirnment variable like TMPBUILD=E:\TMPBUILD and change to $(TEMPBUILD)\$(BuildDefinitionId)

    Some other idea ?


  • Sunday, February 24, 2008 5:40 AMCraig Campbell Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Nope, no other ideas from me.  Nicely done!

     

    --Craig

  • Thursday, June 04, 2009 7:33 AMKiran Boligarla Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Proposed Answer
    Hi,

    I changed the my project path to C:\. Then it worked for me.

    Thanx,
    Kiran
    • Proposed As Answer byApt_WPF Wednesday, November 04, 2009 7:15 AM
    •  
  • Wednesday, November 04, 2009 7:15 AMApt_WPF Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    this worked for me too!!!
    Simply put the project in C:\ drive and it works pretty well. :)