0
votes

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\OfficeTools\Microsoft.VisualStudio.Tools.Office.targets (524): Unable to copy file "C:\Program Files\Reference Assemblies\Microsoft\VSTO40\v4.0.Framework\Microsoft.VisualStudio.Tools.Applications.Runtime.dll" to ".\bin\Release\app.publish\Application Files\SI.TemplateDesignerOffice2007_4_1_9080_0199\Microsoft.VisualStudio.Tools.Applications.Runtime.dll.deploy".

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.

2
What is your question? You have an error message; you need to troubleshoot it. If you've attempted to do so and you're stuck, you need to provide more context on when the error occurs and what you've done to attempt to solve it.Daniel Mann
Question seems "clearish", he can't get his publish to work and the error is the pathname is too long.PmanAce
Is this a VSTS build? Otherwise where does TFS come into it?stuartd

2 Answers

0
votes

Try changing your publish folder, remove it from your bin and put in somewhere higher in your directory structure, like besides your src folder or something.

0
votes

That's the Microsoft limited.

There is a thread talking about this : MSBuild should handle paths longer than MAX_PATH

So, I can think of is that just try to shorten the path, you can refer to below articles to troubleshoot the issue: