0

I have a .net Core web MVC app in VS2015. The app builds and debugs fine, but when I attempt to publish to either local or web profiles I get the infamous "The filename or extension is too long" error message. However, I have this project rooted in my "C:\Projects" folder. There should NOT be any filenames that are more than 260-chars.

To add to the quandary, I have been working on this project for the past 10 months and publishing both locally and web with no problems. However, we recently moved the project development off of an Azure VM, and onto our local dev machine. We setup everything the same way it was on the VM as far as the file structure is concerned. Yet when I attempted to push a simple cshtml file change out (JavaScript change) I ran into this error. I then attempted to publish to my local hard drive and got the same error there as well.

HOWEVER, I was able to copy the project down from TFS to another development machine using the same directory structure and successfully publish from that box! So, what gives???


This post has been out here for a week, and so far no answers... So, today I decided to move my project from the previous "C:\Projects" folder to a new "C:\Proj" folder. I remapped my TFS mapped drive location to this new folder, and pulled the latest.

I made sure the project would build, and ran through a test sequence with all passing. Then I attempted to publish Locally first, and the publish actually worked PERFECTLY!!! I then attempted to do a Web Publish to the Azure site, and got the "file length" error again. After this, now even the Publish Local throws the error!!!

The fact that the project builds, runs, and then published locally on the first try tells me that this is NOT truly a "file length" issue. Is there not ANYONE out there who has run into this same issue with VS 2015???

  • What is the length of the longest file when you publish on Azure? Is it anywhere close to 260 characters? .net adds environment variable called platform to the folder path which might increase the length. Just guessing. – Prashant Mothukuri Nov 07 '17 at 19:14
  • I don't think this is the issue, because I cannot publish to my local drive either. I ran into this exact same issue earlier on this .net Core project when we were using the previous dev VM for development purposes. That time I had to back out changes to the project until it started working again. The issue then was apparently wrapped around a Syncfusion reference, because once I removed the reference it started working again. Not sure why the exact same project, with the exact same folder location "C:\Projects" will publish from one machine, but not another? – Larry Arrington Nov 09 '17 at 19:19
  • I'm beginning to wonder if the nuget package location on the development box makes a difference in the deployment for some reason? I have run into so many quirky issues with .net Core and VS2015, that I am beginning to believe that MS has no idea on many of these types of issues. – Larry Arrington Nov 09 '17 at 19:22

0 Answers0