Skip to main content

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

string
default:"Auto-detected"
The type of documentation system you’re using. Supported values:
  • Mintlify - Mintlify documentation (auto-detected from docs.json)
  • DocFX - DocFX documentation (auto-detected from docfx.json)
  • MkDocs - MkDocs documentation (auto-detected from mkdocs.yml)
  • Jekyll - Jekyll documentation (auto-detected from _config.yml)
  • Hugo - Hugo documentation (auto-detected from hugo.toml)
  • Generic - Generic markdown documentation (default fallback)
The SDK automatically detects your documentation type based on configuration files in your DocumentationRoot.
string
default:"$(MSBuildProjectDirectory)"
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.
bool
default:"false"
When true, automatically generates API documentation from all packable projects in the solution during build.

Output Configuration

Path Settings

string
default:"api-reference"
The output directory for generated API reference documentation, relative to DocumentationRoot.
string
default:"conceptual"
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

string
default:"Folder"
Controls how namespaces are organized in generated documentation:
  • Folder - Each namespace gets a folder matching its hierarchy. For example, System.Collections.Generic becomes System/Collections/Generic/.
  • File - Each namespace gets one file in the output root, with namespace segments joined by a separator. For example, System.Collections.Generic becomes System-Collections-Generic.mdx.
This setting only affects the generated API reference. Conceptual files always use the nested folder layout.

Content Options

bool
default:"true"
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.
bool
default:"true"
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.
bool
default:"false"
When true, displays documentation statistics during build (file counts, etc.).

Mintlify-Specific Configuration

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.
string
default:"Unified"
Controls how API reference navigation is organized in Mintlify:
  • Unified - Single unified navigation group
  • Separated - Separate navigation groups per namespace/assembly
Only applies when DocumentationType is Mintlify.
In 1.1.0 and later, use the <Navigation Mode="..."> attribute in MintlifyTemplate instead of the top-level property.
string
default:"API Reference"
The name of the unified navigation group when using MintlifyNavigationMode=Unified.

Template Configuration

string
default:"Auto-detected"
Path to an external docs.json template file. Auto-detected if docs-template.json exists in DocumentationRoot.
XML element
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 (1 or 2)
  • <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> as system/dark/a Shiki theme name, or a <Theme>/<Languages> object
  • <Integrations> - Analytics and consent providers, including Mixpanel Region, Segment CdnUrl, OneTrust, and Transcend
  • <Contextual> - <Options> as copy;claude or <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 accepts true/false) and <Post> (semicolon-separated keys)
    • <Playground> - <Display> (interactive/simple/auth/none), <Proxy>, <Credentials>
    • <OpenApi> / <AsyncApi> - text URL, Source/Directory attributes, <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) or Separated
    • Type - Integration type: Pages (default), Tabs, or Products
    • Name - 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. Optional Position attribute: Start (default) or End. End appends the tab after every DocumentationReference tab, which is how an outbound href such as a sibling product site sits at the right of the tab bar. Href-only tabs omit pages in docs.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. Sdk on navigation is ignored in MintlifyTemplate; put it in docs.json if 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.
MSBuild Item
References another .docsproj file to include in your documentation output.Attributes:

How References Are Processed

When you include a DocumentationReference, the SDK:
  1. Copies content files to /{DestinationPath}/ in your output
  2. Relocates shared resources (images/, snippets/) to central locations with namespacing
  3. Rewrites internal paths in MDX files to reference the relocated resources
  4. Merges navigation into your docs.json as 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

bool
default:"false"
Controls whether the documentation project produces a NuGet package. Generally should remain false for documentation projects.
bool
default:"false"
Controls whether the documentation project can be published. Generally should remain false for documentation projects.
bool
default:"false"
Controls whether a NuGet package is generated during build. Generally should remain false for documentation projects.

Project Discovery

string
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 .docsproj file

Auto-Included Files

The SDK automatically includes files based on your DocumentationType. You don’t need to manually specify <None Include="..."> for these patterns:

Common Files (All Types)

  • README.md
  • LICENSE*
  • 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, **/*.mdz
  • api-reference/**/*
  • $(ConceptualPath)/**/* (conceptual/**/* by default)
  • overrides/**/*
  • guides/**/*
  • images/**/*
  • snippets/**/*
  • favicon.*

DocFX-Specific

  • docfx.json
  • toc.yml, toc.yaml
  • **/*.yml, **/*.yaml
  • articles/**/*
  • api/**/*
  • templates/**/*

MkDocs-Specific

  • mkdocs.yml
  • docs/**/*.md
  • requirements.txt
  • overrides/**/*
  • theme/**/*

Jekyll-Specific

  • _config.yml, _config.yaml
  • _posts/**/*
  • _layouts/**/*
  • _includes/**/*
  • _sass/**/*
  • _data/**/*
  • assets/**/*
  • Gemfile*

Hugo-Specific

  • hugo.toml, hugo.yaml, hugo.json
  • config.*
  • 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