0

I am trying to publish my web project into a file. I get 49 errors while trying to publish, even though it was working well before, this just happened all of a sudden. The error I'm getting is like this below:

Unable to copy file "C:\Users\nebib\Desktop\www.unifrogtravel.com\Unifrog Travel ASP.NET Core\UnifrogTravel-master\UnifrogTravel-master\UnifrogBasicDeneme\wwwroot\TemplateFiles\star-1.2\SCSS HTML\plugins\rs-plugin\js\jquery.themepunch.revolution.min.js" to "C:\Users\nebib\Desktop\www.unifrogtravel.com\Unifrog Travel ASP.NET Core\UnifrogTravel-master\UnifrogTravel-master\UnifrogBasicDeneme\obj\Release\netcoreapp1.1\PubTmp\Out\wwwroot\TemplateFiles\star-1.2\SCSS HTML\plugins\rs-plugin\js\jquery.themepunch.revolution.min.js". 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.

Even though I searched for an answer to this problem, I couldn't resolve it. Any help is appreciated, thanks.

Nebih Başaran
  • 101
  • 2
  • 12
  • Possible duplicates of [How to avoid System.IO.PathTooLongException?](https://stackoverflow.com/questions/530109/how-to-avoid-system-io-pathtoolongexception), https://stackoverflow.com/questions/48990537/asp-net-publish-error-the-specified-path-file-name-or-both-are-too-long & https://stackoverflow.com/questions/8745215/best-way-to-resolve-file-path-too-long-exception. – Tetsuya Yamamoto Oct 08 '18 at 12:55

2 Answers2

0

The problem is that the path is too long. Your message error says "The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters." Try to copy and/or deploy it to a different folder. (e.g. c:\temp\myAppSource and c:\temp\myAppTarget)

Francisco G
  • 1,434
  • 2
  • 14
  • 22
  • I tried to do that but since the 49 files that I'm trying to copy are already in a pre-structured file fromat wihch exceeds 248 characters, that will be a long workaround to the problem and I am not willing to move those files and change each code snippet that referred to those files. – Nebih Başaran Oct 08 '18 at 12:56
  • @NebihBaşaran, try mapping a network drive to your folder (right click on "My PC", map network drive) (probably you will have to share the folder in order to see it) and put as drive name "yourPCname..." then use that drive, it should be shorter – Francisco G Oct 08 '18 at 13:07
0

This is actually a very very long path for VS to publish the project. Best move the project to a different drive such a D:\UnifrogTravel-master\UnifrogBasicDeneme and publish it. I'm afraid there is no other work around for this.