Doraku / DefaultDocumentation

Create a simple markdown documentation from the Visual Studio xml one.
MIT No Attribution
157 stars 26 forks source link

System.IO.PathTooLongException: The specified path, file name, or both are too long. #86

Closed jacobSpitzer closed 2 years ago

jacobSpitzer commented 2 years ago

I just tried to run this tool, it has successfully created a lot of .md files, until I got this error: 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. 1>C:\Users\User.nuget\packages\defaultdocumentation\0.7.9\build\DefaultDocumentation.targets(38,5): error MSB4018: at System.IO.LongPathHelper.Normalize(String path, UInt32 maxPathLength, Boolean checkInvalidCharacters, Boolean expandShortPaths)

Doraku commented 2 years ago

Look at the <DefaultDocumentationFileNameMode> property in the readme. By default the full name of each member is used as file name but this can produce name too long for the os. You have other values possible that shorten the file name.

See #57

jacobSpitzer commented 2 years ago

Thanks for your quick response Sorry for my lack of knowledge where should I put these settings? In the csproj file? I have tried to add <DefaultDocumentationFileNameMode>Md5</DefaultDocumentationFileNameMode> but no luck so far. the same error happened.

jacobSpitzer commented 2 years ago

I found the answer https://github.com/Doraku/DefaultDocumentation/discussions/43#discussioncomment-883076 where exactly I need to put the settings. Thank you so so much for the great nice project !!