Summary
While fixing #539, building TodoApp.BlazorWasm.Server with -p:GenerateDocumentationFile=true surfaced a remaining CS1574 warning in TodoContext.cs after the missing-using bug from #539 was fixed:
Database/TodoContext.cs(60,84): warning CS1574: XML comment has cref attribute 'AnyAsync{TSource}(IQueryable{TSource})' that could not be resolved
Unlike #539, the type (EntityFrameworkQueryableExtensions) is already in scope via using Microsoft.EntityFrameworkCore; — the problem is that the cref's parameter list doesn't match any actual overload signature. The real extension method is:
public static Task<bool> AnyAsync<TSource>(this IQueryable<TSource> source, CancellationToken cancellationToken = default)
which takes a CancellationToken parameter that the cref omits.
File affected
samples/todoapp-blazor-wasm/TodoApp.BlazorWasm.Server/Database/TodoContext.cs (line ~60)
How to reproduce
dotnet build samples/todoapp-blazor-wasm/TodoApp.BlazorWasm.Server/TodoApp.BlazorWasm.Server.csproj -p:GenerateDocumentationFile=true
Suggested fix
Update the cref to include the CancellationToken parameter, e.g.:
/// <item><description>Checks if the TodoItems table is empty using <see cref="EntityFrameworkQueryableExtensions.AnyAsync{TSource}(IQueryable{TSource}, CancellationToken)"/>.</description></item>
Summary
While fixing #539, building
TodoApp.BlazorWasm.Serverwith-p:GenerateDocumentationFile=truesurfaced a remaining CS1574 warning inTodoContext.csafter the missing-usingbug from #539 was fixed:Unlike #539, the type (
EntityFrameworkQueryableExtensions) is already in scope viausing Microsoft.EntityFrameworkCore;— the problem is that thecref's parameter list doesn't match any actual overload signature. The real extension method is:which takes a
CancellationTokenparameter that the cref omits.File affected
samples/todoapp-blazor-wasm/TodoApp.BlazorWasm.Server/Database/TodoContext.cs(line ~60)How to reproduce
Suggested fix
Update the cref to include the
CancellationTokenparameter, e.g.:/// <item><description>Checks if the TodoItems table is empty using <see cref="EntityFrameworkQueryableExtensions.AnyAsync{TSource}(IQueryable{TSource}, CancellationToken)"/>.</description></item>