0
votes

I am seeing this error in the Team Build.

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\Windows Azure Tools\2.4\Microsoft.WindowsAzure.targets (985): 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.

I have seen other Q&As on this topic.My question is not exactly about the fix.
Is there a way to find out which specific file is causing this error?

1

1 Answers

1
votes

First, build with high logging verbosity*, look in the log at the lines right before the error, and maybe figure out what the offending file/folder is.

Failing that, you can look in the specific target file and line, and see what it's trying to do. This will not be easy, since you'll have to figure out values of properties / etc.

* How to do it:

  • From Visual Studio: Tools => Options => Projects and Solutions => Build and Run => MSBuild project build output verbosity, and look at the Output pane
    • Beware that log file verbosity works only for C++ projects!
  • From commandline: MSBuild /flp:verbosity=diagnostic" my.csproj, and look at msbuild.log
  • From team build (2012): Edit build definition => Process => 2. Basic => Logging Verbosity, then run build and look at (drop folder)\Logs