Visual studio 2019 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.
Updated on: September 12, 2019
Solution for Project or Solution creation got failed due to maximum file path name or directory path name has exceeded the maximum length:
- When creating any project with Visual Studio 2019, and specifying a location as shown below:
- The location specified above is too lengthy i.e. 90 characters in total
- When we Create a project on this location with Visual Studio 2019, it fails at the end and it gives 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.
- We need to change the location to short length location such as at "F:\MyWebsites\HospitalManagementAPI"
- Once we changed the location, we can link the older location to this new location from "mklink" command as shown below:
- This will create Symbolic link between these two locations and you can visit any location and see the same project