Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DocFx Issue #11046 — Reproduction

Minimal reproduction for dotnet/docfx#11046.

Problem

docfx metadata fails for Blazor component projects when running with .NET SDK 10.0.2xx (200-band). The Razor compiler analyzer requires Roslyn 5.3.0, but DocFx 2.78.5 bundles an older version.

Prerequisites

  • .NET SDK 10.0.2xx (e.g. dotnet --version10.0.201)
  • DocFx 2.78.5 (dotnet tool install -g docfx --version 2.78.5)

Steps to Reproduce

# 1. Verify the project builds successfully
dotnet build src/ReproLib/ReproLib.csproj

# 2. Run docfx metadata — this fails
docfx metadata docs/docfx.json

Expected

docfx metadata succeeds.

Actual

warning: FailedToLoadAnalyzer: Failed to load .NET Analyzer.
  AnalyzerName: Microsoft.CodeAnalysis.Razor.Compiler
  ErrorCode: ReferencesNewerCompiler
  ReferencedCompilerVersion: 5.3.0.0

error CS0115: 'Component1.OnInitialized()': no suitable method found to override

Build failed.
    2 warning(s)
    1 error(s)

The Razor source generator cannot load, so it does not produce the generated partial class for Component1.razor. The code-behind file (Component1.razor.cs) overrides OnInitialized() from ComponentBase, but without the generated partial class the inheritance chain is missing — causing CS0115.

Workaround

Pin the SDK to the 100-band via global.json:

{
  "sdk": {
    "version": "10.0.103",
    "rollForward": "disable"
  }
}

About

Minimal reproduction for dotnet/docfx#11046 — DocFx metadata fails with .NET SDK 10.0.2xx

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages