The “System.IO.PathTooLongException” error

Applies to
ApexSQL Doc, ApexSQL Doc for MySQL

Summary
This article explains what to do when the "System.IO.PathTooLongException" error is encountered

Symptoms
When documenting a database, the documentation process fails and the "System.IO.PathTooLongException" error is encountered

Cause
ApexSQL Doc creates intermediary files prior to the final document generation

Windows has a filepath length limit of 248. With the filename, the length limit is 260. The error is encountered when a fully qualified filename of the generated intermediary file(s) exceeds this limit

Resolution
To resolve this issue, change the location of intermediary files:

  1. Start ApexSQL Doc
  2. On the Home tab, click Application options
  3. Open the Output tab
  4. Specify a shorter path in the Intermediary files location, e.g. C:/Temp
  5. Click OK to apply the settings
  6. Restart the documentation process

About ApexSQL Doc
ApexSQL Doc documents SQL Servers, databases, objects, and SSIS packages in a single document. Create database documentation in a variety of formats including compiled help (.CHM), HTML and MS Word. Schedule your documentation process unattended with the help of the CLI

Last updated
April 7, 2013