microsoft / AADConnectConfigDocumenter

AAD Connect configuration documenter is a tool to generate documentation of an AAD Connect installation.
Other
245 stars 49 forks source link

Unhandled Exception: System.IO.PathTooLongException #6

Closed joerankin1 closed 7 years ago

joerankin1 commented 7 years ago

Hello,

I'm running the latest version of the tool as described and receive this error right when it appears the report is being generated:

Unhandled Exception: System.IO.PathTooLongException: 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.

This is running on the latest version of Windows 10 Enterprise which has .NET 462 built-in. Tried to install .NET 4.5 but the installation won't complete since 462 is present. .NET 462 is supposed to be backwards compatible.

Any advice or workarounds for this issue? Please advise, thanks!

NileshGhodekar commented 7 years ago

Can you try moving the documenter folder directly under C:\ for example to shorten the complete path?

joerankin1 commented 7 years ago

Thanks for the reply. I've tried making every path under Data one letter long (except for the three AAD Connect folders (Connectors, GlobalSettings and SynchronizationRules) and I am running it from the root of C:. The same issue exists.

NileshGhodekar commented 7 years ago

Looks like Temp files path is getting too long. Can you put "SET TMP=%~dp0" as the first line in your AzureADConnectSyncDocumenter.cmd script and see if it helps? You should then see temp files getting generated in the documenter folder when the tool is running.

joerankin1 commented 7 years ago

That seems to have done the trick, thank you! I did have to move over to the D: partition since C: was giving me access denied errors. I did see the temp files get generated as you said after adding that line to the .cmd file. Thanks again for your help!

NileshGhodekar commented 7 years ago

Good to see it workaround worked. Do you have any "illegal / suspect" chars in the default temp folder path?

joerankin1 commented 7 years ago

Nothing suspect in the tmp variable paths either. C:\Users\xxx\AppData\Local\Temp - pretty much default setting.