dotnet / docfx

Static site generator for .NET API documentation.
https://dotnet.github.io/docfx/
MIT License
4k stars 852 forks source link

Can't generate docs for project: log.txt is locked #3848

Closed RickStrahl closed 9 months ago

RickStrahl commented 5 years ago

DocFX Version Used: 2.40.5

Template used: (default or statictoc or contain custom template) Visual Studio Code Documentation?

Steps to Reproduce:

  1. Added DocFx.Console to project via NuGet
  2. Explicitly override target framework (mulit-targeted project) to netstandard20 (also try net45)
  3. Build

Expected Behavior: API documentation built.

Actual Behavior: The initial site layout is created but API docs are not generated. Basically I get an empty site.

There's an error accessing the log.txt file. However, there's nothing else other than DocFx accessing this file (AFAIK).

Error is:

1>[18-12-31 11:45:55.189]Error:System.IO.IOException: The process cannot access the file 'C:\projects2010\Westwind.Utilities\Westwind.Utilities\log.txt' because it is being used by another process.
1>   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
1>   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
1>   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
1>   at System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
1>   at System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
1>   at System.IO.StreamWriter..ctor(String path, Boolean append)
1>   at Microsoft.DocAsCode.Common.ReportLogListener..ctor(String reportPath, String repoRoot, String root)
1>   at Microsoft.DocAsCode.SubCommands.CommandCreator`2.Create(String[] args, ISubCommandController controller, SubCommandParseOption option)
1>   at Microsoft.DocAsCode.SubCommands.CompositeCommand..ctor(String[] args, ISubCommandController controller, CompositeOptions options)
1>   at Microsoft.DocAsCode.SubCommands.CommandController.Create()
1>   at Microsoft.DocAsCode.Program.ExecSubCommand(String[] args)
1>docfx 2.40.5.0

File is not locked and can be deleted with regular user account.

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs.