Visual Studio 2017 Publish - Error on "Start Preview"

Sarah Ward
Sarah Ward used Ask the Experts™
on
I'm having an issue previewing my changes before publishing my code.   When I click "Start Preview" I'm getting the following error:

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.

Pretty vague.  What File name?  I did a Google search on the error and the results returned are from users having issues Publishing their solution.  I can publish the solution without error.  It's the "Start Preview" that fails.  

It's also a random error.  Sometimes it happens and sometimes the Preview works.

Any suggestions?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Change the folder location of your project. I have found folder locations under "My Documents" to often cause issue. I now put my VS projects into a simple "C:\Projects" folder or something similar. The issue is normally that the length of the path to reach project files under the "My Docuements\Visual Studio 2017\Projects\..." path is  often longer than 256 characters.
Sarah WardDeveloper

Author

Commented:
Thanks, MlandaT.  I'll try this on Monday (working on a deadline now) and let you know if this resolves the problem.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial