Doraku / DefaultDocumentation

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

System.Exception when building do to file name length #148

Closed Ecotone123 closed 6 months ago

Ecotone123 commented 1 year ago

I'm getting this error when building:

Error MSB4018 The "DefaultDocumentationTask" task failed unexpectedly. System.Exception: Error while writing documentation for TBMCS.Server.Services.FluentValidationExtensions.FriendlyUnitIdExistAsync<T>(this FluentValidation.IRuleBuilder<T,string>, System.Linq.Expressions.Expression<System.Func<T,string>>, TBMCS.Server.Persistence.McampContext) ---> System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Projects\TBMCS\Working Branches\3274 - USMTFWriterQueue documentation\docs\TBMCS.Server.Services.FluentValidationExtensions.FriendlyUnitIdExistAsync_T_(thisFluentValidation.IRuleBuilder_T,string_,System.Linq.Expressions.Expression_System.Func_T,string__,TBMCS.Server.Persistence.McampContext).md'.

It's caused by the file name length (plus path). Using the Members option can result in very long file names. Maybe leave out the parameter list and just have maybe a number for overloads.

Ecotone123 commented 1 year ago

I found that I can use configuration setting to resolve this issue although I think the default filename factory should be updated to shorten file names.

panwauu commented 11 months ago

What configuration did you use to avoid this error?

Doraku commented 6 months ago

As stated in the readme:

FileNameFactory

Name or Type Assembly of the IFileNameFactory implementation to use to generate the name of pages. Available implementations are:

FullName is the default as it is the one with no risk of collusion, but it has the risk of producing a path too long, there's no perfect value saddly.