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???