Summary
Database/AppDbContext.cs's XML doc comment on DbContextInitializer references <see cref="DatabaseFacade.EnsureCreated"/>, but DatabaseFacade isn't resolvable because the file has no using Microsoft.EntityFrameworkCore.Infrastructure; (where that type lives):
Database/AppDbContext.cs(42,35): warning CS1574: XML comment has cref attribute 'EnsureCreated' that could not be resolved
CI run: https://github.com/CommunityToolkit/Datasync/actions/runs/29093946725 (todoapp-uno / android job)
This only surfaced on the android head in this run (the Microsoft.Android.Sdk appears to enable GenerateDocumentationFile/doc-comment analysis by default, unlike the other TFMs), but the underlying doc-comment bug is present regardless of head.
Root cause
using Microsoft.EntityFrameworkCore;
namespace TodoApp.Uno.Database;
...
/// <summary>
/// Use this class to initialize the database. In this sample, we just create
/// the database using <see cref="DatabaseFacade.EnsureCreated"/>. However, you
/// may want to use migrations.
/// </summary>
public class DbContextInitializer(AppDbContext context) : IDbInitializer
DatabaseFacade is defined in Microsoft.EntityFrameworkCore.Infrastructure, not Microsoft.EntityFrameworkCore, and the file only imports the latter. The C# XML doc compiler can't resolve the cref without the type being in scope (or fully qualified), so it emits CS1574 instead of a working doc link.
Suggested fix
Either:
- Add
using Microsoft.EntityFrameworkCore.Infrastructure; to Database/AppDbContext.cs, or
- Fully qualify the cref:
<see cref="Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade.EnsureCreated"/>.
Option 1 is simpler and consistent with the rest of the file's style.
Summary
Database/AppDbContext.cs's XML doc comment onDbContextInitializerreferences<see cref="DatabaseFacade.EnsureCreated"/>, butDatabaseFacadeisn't resolvable because the file has nousing Microsoft.EntityFrameworkCore.Infrastructure;(where that type lives):CI run: https://github.com/CommunityToolkit/Datasync/actions/runs/29093946725 (
todoapp-uno / androidjob)This only surfaced on the
androidhead in this run (theMicrosoft.Android.Sdkappears to enableGenerateDocumentationFile/doc-comment analysis by default, unlike the other TFMs), but the underlying doc-comment bug is present regardless of head.Root cause
DatabaseFacadeis defined inMicrosoft.EntityFrameworkCore.Infrastructure, notMicrosoft.EntityFrameworkCore, and the file only imports the latter. The C# XML doc compiler can't resolve thecrefwithout the type being in scope (or fully qualified), so it emits CS1574 instead of a working doc link.Suggested fix
Either:
using Microsoft.EntityFrameworkCore.Infrastructure;toDatabase/AppDbContext.cs, or<see cref="Microsoft.EntityFrameworkCore.Infrastructure.DatabaseFacade.EnsureCreated"/>.Option 1 is simpler and consistent with the rest of the file's style.