CS0111 fires when two members in the same type have the same name and identical parameter types - they are not valid overloads. In CI this is usually a merge that duplicated a method, or a generated partial class colliding with a hand-written one.
What this error means
The build fails with CS0111 naming the duplicated member and type. It reproduces every run.
dotnet
Services/Mailer.cs(40,21): error CS0111: Type 'Mailer' already defines a member called
'Send' with the same parameter types
Diagnose it: SDK version and restore first
Most .NET CI failures are an SDK mismatch or a restore that did not happen. global.json pins the SDK, and if the runner does not have that exact version the failure message is about the project rather than the SDK.
Terminal
dotnet --info
cat global.json 2>/dev/null
# restore explicitly so a restore failure is not reported as a build failure
dotnet restore --verbosity normal
dotnet build --no-restore -warnaserror
Common causes
A merge duplicated the member
A three-way merge kept both sides of an edited method, producing two identical signatures in one type.
A generated partial collides with hand-written code
A source generator or scaffolded partial defines a member that also exists in a non-generated file of the same partial type.
How to fix it
Remove the duplicate
Delete one of the two identical members, keeping the intended implementation.
If a generator owns the member, remove the hand-written copy or rename it.
Rebuild.
How to prevent it
Review merges for duplicated method bodies.
Keep generated and hand-written members in clearly separated partials.
Frequently asked questions
What causes C# "CS0111: type already defines a member" in CI?
There are 2 common causes: a merge duplicated the member and a generated partial collides with hand-written code. A three-way merge kept both sides of an edited method, producing two identical signatures in one type.
How do I fix C# "CS0111: type already defines a member" in CI?
Remove the duplicate. Delete one of the two identical members, keeping the intended implementation.
What does C# "CS0111: type already defines a member" in CI actually mean?
The build fails with CS0111 naming the duplicated member and type.
How do I stop C# "CS0111: type already defines a member" in CI happening again?
Review merges for duplicated method bodies. The prevention section lists 2 changes that keep it from recurring.