Overview
The.docsproj file is the heart of your DotNetDocs project. It uses the DotNetDocs.Sdk MSBuild SDK to configure how your documentation is generated, organized, and rendered. This guide covers all available MSBuild properties you can configure.
Basic Configuration
SDK Reference
Every.docsproj file must reference the DotNetDocs.Sdk:
Essential Properties
The type of documentation system you’re using. Supported values:
Mintlify- Mintlify documentation (auto-detected fromdocs.json)DocFX- DocFX documentation (auto-detected fromdocfx.json)MkDocs- MkDocs documentation (auto-detected frommkdocs.yml)Jekyll- Jekyll documentation (auto-detected from_config.yml)Hugo- Hugo documentation (auto-detected fromhugo.toml)Generic- Generic markdown documentation (default fallback)
DocumentationRoot.The root directory containing your documentation files. This allows the
.docsproj file to be in a different location than your actual documentation files.When
true, automatically generates API documentation from all packable projects in the solution during build.Output Configuration
Path Settings
The output directory for generated API reference documentation, relative to
DocumentationRoot.The output directory for conceptual documentation, relative to
DocumentationRoot.Documentation Generation
Namespace Organization
Controls how namespaces are organized in generated documentation:
Folder- Each namespace gets its own folderFile- All namespaces in a single fileFlat- Flat file structure without namespace hierarchy
Content Options
When
true, enables generation of conceptual documentation from XML comments.When
true, shows placeholder content for types/members that don’t have XML documentation.When
true, displays documentation statistics during build (file counts, etc.).Mintlify-Specific Configuration
Navigation Settings
Controls how API reference navigation is organized in Mintlify:
Unified- Single unified navigation groupSeparated- Separate navigation groups per namespace/assembly
DocumentationType is Mintlify.The name of the unified navigation group when using
MintlifyNavigationMode=Unified.Template Configuration
Path to an external
docs.json template file. Auto-detected if docs-template.json exists in DocumentationRoot.Inline Mintlify theme and branding configuration. This XML element allows you to configure the visual appearance of your Mintlify documentation.Supported child elements:
<Name>- Project name displayed in documentation<Theme>- Mintlify theme name (e.g.,maple,quill,venus)<Colors>- Color scheme configuration<Primary>- Primary brand color<Light>- Light mode accent color<Dark>- Dark mode accent color
Advanced Configuration
Build Behavior
Controls whether the documentation project produces a NuGet package. Generally should remain
false for documentation projects.Controls whether the documentation project can be published. Generally should remain
false for documentation projects.Controls whether a NuGet package is generated during build. Generally should remain
false for documentation projects.Project Discovery
Semicolon-separated list of glob patterns for excluding projects from documentation generation.
Complete Example
Here’s a complete.docsproj file demonstrating common configuration:
Environment Variables
The SDK also respects standard MSBuild environment variables:$(Configuration)- Build configuration (Debug/Release)$(SolutionName)- Name of the solution$(SolutionFileName)- Full filename of the solution file$(MSBuildProjectDirectory)- Directory containing the.docsprojfile
Auto-Included Files
The SDK automatically includes files based on yourDocumentationType. You don’t need to manually specify <None Include="..."> for these patterns:
Common Files (All Types)
README.mdLICENSE*CHANGELOG***/*.txt- All image files (png, jpg, gif, svg, webp, ico, pdf)
- All font files (woff, ttf, otf, eot)
- All web assets (css, scss, js, ts)
Mintlify-Specific
docs.json**/*.md,**/*.mdx,**/*.mdzapi-reference/**/*conceptual/**/*overrides/**/*guides/**/*images/**/*snippets/**/*favicon.*
DocFX-Specific
docfx.jsontoc.yml,toc.yaml**/*.yml,**/*.yamlarticles/**/*api/**/*templates/**/*
MkDocs-Specific
mkdocs.ymldocs/**/*.mdrequirements.txtoverrides/**/*theme/**/*
Jekyll-Specific
_config.yml,_config.yaml_posts/**/*_layouts/**/*_includes/**/*_sass/**/*_data/**/*assets/**/*Gemfile*
Hugo-Specific
hugo.toml,hugo.yaml,hugo.jsonconfig.*content/**/*layouts/**/*static/**/*themes/**/*archetypes/**/*data/**/*i18n/**/*