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 of your documentation site. This allows the
.docsproj file to be in a different location than your actual documentation files.Everything the SDK reads and writes for the site resolves from this folder: documentation type detection, docs-template.json, the generated docs.json, ApiReferencePath, and ConceptualPath. Only build artifacts, such as the files under bin, stay next to the .docsproj.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 folder that holds your conceptual content (
usage.mdz, examples.mdz, and so on), relative to DocumentationRoot or as an absolute path. Placeholders are generated here and content is loaded from here.Documentation Generation
Namespace Organization
Controls how namespaces are organized in generated documentation:
Folder- Each namespace gets a folder matching its hierarchy. For example,System.Collections.GenericbecomesSystem/Collections/Generic/.File- Each namespace gets one file in the output root, with namespace segments joined by a separator. For example,System.Collections.GenericbecomesSystem-Collections-Generic.mdx.
Content Options
When
true, creates placeholder conceptual files (such as usage.mdz and examples.mdz) under ConceptualPath for every namespace and type that doesn’t have them yet, and merges their content into the generated documentation. Existing files are never overwritten. Set it to false to skip both steps.When
true, conceptual files that still contain the placeholder marker (<!-- TODO: REMOVE THIS COMMENT AFTER YOU CUSTOMIZE THIS CONTENT -->) are included in the generated documentation. Set it to false for production builds, so only conceptual content you’ve written appears.Mintlify-Specific Configuration
Navigation Settings
1.1.0+: Navigation configuration has been refactored. The
<Navigation> element now uses attributes for Mode, Type, and Name. Legacy properties (MintlifyNavigationMode, MintlifyNavigationType, MintlifyNavigationName) are still supported for backward compatibility.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 and navigation structure of your Mintlify documentation.Supported child elements:
<Name>- Project name displayed in documentation<Theme>- Mintlify theme (mint,maple,palm,willow,linden,almond,aspen,sequoia,luma)<ThemeVersion>- Mint theme version (1or2)<Public>- Whether the documentation is publicly accessible by default<Colors>- Color scheme configuration<Primary>- Primary brand color<Light>- Light mode accent color<Dark>- Dark mode accent color
<Variables>- Global content variables (<Variable Name="apiVersion">v2</Variable>)<Markdown>- Markdown export for AI agents (Schema,Instructions)<Packages>- Third-party npm libraries (Ssr,Provider,Css,Registries)<Banner>- Announcement bar (Content,Dismissible,Type,Color)<Seo>- SEO settings (Indexing,TrailingSlash,Organization,Paths,Metatags)<Thumbnails>- Social preview images (Preset,Surface,Eyebrow,Fonts)<Styling>-<Codeblocks>assystem/dark/a Shiki theme name, or a<Theme>/<Languages>object<Integrations>- Analytics and consent providers, including MixpanelRegion, SegmentCdnUrl, OneTrust, and Transcend<Contextual>-<Options>ascopy;claudeor<Option>children (builtin name or Title/Href custom objects)<Api>- API playground and OpenAPI/AsyncAPI settings<Optional>- Playground optional-field layout (static,expanded,collapsed)<Params>-<Expanded>(all/closed, also acceptstrue/false) and<Post>(semicolon-separated keys)<Playground>-<Display>(interactive/simple/auth/none),<Proxy>,<Credentials><OpenApi>/<AsyncApi>- text URL,Source/Directoryattributes,<Overlays>,<Overlay>children, nested<Spec>entries, or repeated elements for mixed arrays- Legacy
<Proxy>on<Api>maps to<Playground><Proxy>
<Navigation>- (1.1.0+) Navigation configuration with attributes:Mode- Navigation organization mode:Unified(default) orSeparatedType- Integration type:Pages(default),Tabs, orProductsName- Custom display name for tabs/products (optional, defaults to project name)Graphql/<Graphql>- Auto-populate GraphQL pages (Source,Directory)Mcp/<Mcp>- Auto-populate MCP pages (Source,Directory)<Tabs>/<Tab>- Explicit tabs. OptionalPositionattribute:Start(default) orEnd.Endappends the tab after everyDocumentationReferencetab, which is how an outbound href such as a sibling product site sits at the right of the tab bar. Href-only tabs omitpagesindocs.json. GraphQL and MCP can also be set on a tab or group.- Pages may include
<Page>,<Link Href="..." Title="..." />, and<SourceRef>entries. Directory(none/accordion/card),Searchable,Align(tabs:start/end),DisplayName(products), and<Thumbnail>overrides.Sdkon navigation is ignored in MintlifyTemplate; put it indocs.jsonif needed.
The
<Navigation> element and its attributes are only available in 1.1.0 and later. For 1.0.x, use the legacy MintlifyNavigationMode property.Documentation References
The<DocumentationReference> item allows you to combine multiple documentation projects into a single unified site. This is useful for organizations with multiple libraries or products that should share a common documentation portal.
How References Are Processed
When you include aDocumentationReference, the SDK:
- Copies content files to
/{DestinationPath}/in your output - Relocates shared resources (
images/,snippets/) to central locations with namespacing - Rewrites internal paths in MDX files to reference the relocated resources
- Merges navigation into your
docs.jsonas a Tab or Product
For Mintlify documentation, see Collections for detailed information about how path rewriting and resource relocation work.
Multiple References Example
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/**/*$(ConceptualPath)/**/*(conceptual/**/*by default)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/**/*
Build Targets
You can invoke specific documentation tasks using MSBuild targets:Next Steps
Pipeline Overview
Learn how the documentation pipeline works
Conceptual Docs
Add conceptual documentation to your project