Troubleshooting Guide
This guide covers common issues you might encounter when using Tanka Docs and their solutions.
Installation Issues
Tool Installation Fails
Error:
Could not execute because the specified command or file was not found.
Solution:
- Ensure you have .NET 6+ installed:
dotnet --version
- If .NET is not installed, download from https://dotnet.microsoft.com/download
- Retry the installation:
dotnet tool install --global Tanka.DocsGen
Permission Errors During Installation
Error:
Access to the path is denied.
Solution:
- On Windows: Run as Administrator
- On macOS/Linux: Use
sudo
if necessary, or install to user directory:dotnet tool install --global Tanka.DocsGen --tool-path ~/.dotnet/tools
Configuration Issues
Configuration File Not Found
Error:
Could not load configuration: 'tanka-docs.yml'
Solutions:
Check file exists:
ls -la tanka-docs.yml
Check current directory:
pwd
Specify configuration path:
tanka-docs build -f path/to/tanka-docs.yml
Invalid YAML Syntax
Error:
YamlDotNet.Core.YamlException: Invalid YAML
Solutions:
- Validate YAML syntax using online YAML validators
- Check indentation - YAML is sensitive to spaces/tabs
- Check quotes - Use consistent quote styles
- Common issues:
- Mixed tabs and spaces
- Missing colons after keys
- Incorrect list formatting
Example of correct YAML:
title: "My Site"
sources:
- name: "local"
type: "local"
path: "."
Build Issues
Section Configuration Missing
Error:
Section configuration not found: tanka-docs-section.yml
Solution:
- Check each section directory has a
tanka-docs-section.yml
file - Verify file name is exactly
tanka-docs-section.yml
- Example section configuration:
id: "docs" title: "Documentation" type: "docs" index_page: "index.md"
Referenced Files Not Found
Error:
File not found: installation.md
Solutions:
Check file exists:
ls -la docs/installation.md
Check navigation references:
navigation: - title: "Installation" page: "installation.md" # Must match actual filename
Check cross-references:
[Link](xref://installation.md) # Must match actual filename
Include Files Not Found
Error:
Include file not found: src/Program.cs
Solutions:
Verify include syntax:
\#include::xref://src:Program.cs
Check file exists:
ls -la src/Program.cs
Use debug mode to see detailed processing:
tanka-docs build --debug
Git and Versioning Issues
Git Repository Issues
Error:
LibGit2Sharp.RepositoryNotFoundException: Path does not exist
Solutions:
Initialize Git repository:
git init git add . git commit -m "Initial commit"
Check Git status:
git status
For local-only documentation (no Git), use local source:
sources: - name: "local" type: "local" path: "."
Version Detection Issues
Error:
No versions found in repository
Solutions:
Create at least one tag:
git tag v1.0.0
Check existing tags:
git tag -l
Use branches for versions:
git checkout -b docs-v1.0
Include Directive Issues
Roslyn Symbol Not Found
Error:
Symbol not found: MyNamespace.MyClass.MyMethod
Solutions:
Check symbol exists in the specified file
Use fully qualified name:
\#include::xref://src:MyFile.cs?s=MyNamespace.MyClass.MyMethod
Check file compiles:
dotnet build
List available symbols in debug mode:
tanka-docs build --debug
Escaped Includes Not Working
Problem: Escaped includes still get processed
Solution: Ensure you're using the correct escape syntax:
\#include::xref://src:Program.cs
If this doesn't work, check you're using the latest version of Tanka Docs.
Output and Deployment Issues
Permission Denied Writing Output
Error:
Access to the path 'gh-pages' is denied.
Solutions:
Check directory permissions:
ls -la gh-pages/
Change permissions if needed:
chmod -R 755 gh-pages/
Use different output directory:
tanka-docs build -o ./my-output
Generated Links Not Working
Problem: Links return 404 errors when deployed
Solutions:
Set correct base path for subdirectory deployment:
tanka-docs build --base "/my-docs/"
Check server configuration for static file serving
Verify relative paths in generated HTML
Performance Issues
Slow Build Times
Solutions:
Clean build directory:
rm -rf _build/
Reduce processed content:
- Remove unused files from sections
- Use
.gitignore
patterns in configuration
Optimize includes:
- Include specific symbols instead of entire files
- Cache frequently used includes
High Memory Usage
Solutions:
- Process smaller batches by splitting large sections
- Remove large binary files from source directories
- Use include directives instead of copying large files
Debug Mode
For detailed troubleshooting information, always use debug mode:
tanka-docs build --debug
This provides:
- Detailed processing steps
- File resolution information
- Error stack traces
- Performance timing
- Git repository information
Common Configuration Patterns
Working Directory Issues
Problem: Relative paths not resolving correctly
Solution: Understand working directory behavior:
- Working directory = directory containing
tanka-docs.yml
- All relative paths resolve from working directory
- Use
-f
option to specify config file location
Multiple Environment Configurations
Pattern: Different configs for dev/prod
Solution:
# Development
tanka-docs build -f config/dev.yml -o ./dev-output
# Production
tanka-docs build -f config/prod.yml -o ./dist --base "/docs/"
Getting Additional Help
Enable Detailed Logging
tanka-docs build --debug > build.log 2>&1
Check Version
tanka-docs --version
Update to Latest Version
dotnet tool update --global Tanka.DocsGen
Validate Configuration
Before building, validate your configuration manually:
- Check YAML syntax with online validators
- Verify all referenced files exist
- Test with minimal configuration first
- Use relative paths consistently
Error Message Index
Error Pattern | Section |
---|---|
Could not load configuration |
Configuration Issues |
File not found |
Build Issues |
YamlException |
Configuration Issues |
RepositoryNotFoundException |
Git and Versioning Issues |
Access denied |
Output and Deployment Issues |
Symbol not found |
Include Directive Issues |
Still Need Help?
If you can't resolve your issue with this guide:
- Check the documentation for the specific feature you're using
- Search existing issues in the project repository
- Create a minimal reproduction case
- Include the full error message and debug output
- Specify your environment (OS, .NET version, Tanka Docs version)