Skip to content

Refusals, by what they say

Everything else in this area is organised by cause. This page is organised by what is on your screen, because that is all you have when something refuses.

Each message below is read out of the place that says it when this page is built, so a sentence somebody reworded fails the build rather than leaving you searching for words that no longer exist anywhere. Where a message names a value of yours, the row carries the fixed part — nobody searches for their own case name.

7 refusals. The first two stop an adoption before anything runs.

error CS0579: Duplicate

When: you build, before anything runs

What it means. a project underneath your application's own was compiled into it. Every default glob the SDK applies reaches the whole tree below a project file, so the driving project's generated assembly attributes were compiled a second time.

What clears it. add DefaultItemExcludes to the application's project file, naming the folder the driving project is in. With UseWPF on, the project named in the brackets can be a _wpftmp project you never wrote, which is why this reads like a XAML problem and is not.

More about this

winwright: the MCP server is not built, so this session has no winwright tools.

When: the tools are missing from a Claude Code session

What it means. the plugin is installed and the server it launches has never been compiled. A stdio server cannot say so over the protocol — it either speaks it or exits — so this goes to stderr, where the harness shows it beside the failed server.

What clears it. build the solution once in Release. The two install commands do not do it for you.

More about this

the foreground belongs to the window under test

When: a run answers 2 and names holes

What it means. the assertions never ran, because an act that synthesises input needs the foreground and Windows did not grant it. It is not a flaky suite and it is not your application: it is a desk somebody else is using, which includes you.

What clears it. give the run a desk of its own — a VM with an interactive session, or any machine nobody is sitting at. Re-running on the same busy desk is the one response that changes nothing.

More about this

an application that renders its own tree when asked

When: a capture asks the application to render itself

What it means. the application under test does not reference Winwright.InApp, or the run that started it did not arm the surface. Nothing quietly took a copy of the screen instead — that is the substitution this refuses.

What clears it. reference Winwright.InApp in the application, arm it where the application starts, and launch it from a run that names somewhere to write.

More about this

no case is called that; there is

When: you run one case by name

What it means. the selector matched no case, and the run was refused rather than run. A run of no cases has no failure and no hole in it, so it would otherwise read as a pass about nothing.

What clears it. copy a name out of the list the refusal prints. Names are exact, and they are the case's own `name` field rather than its file.

More about this

is declared twice, so a case naming it names two

When: the cases load

What it means. two cases across the suite carry the same name, so selecting one by name would select two. It is refused at load, before anything is launched.

What clears it. rename one of them. A name has to be unique across the whole suite, not just its file.

More about this

and nothing carries it to the launch

When: a fixture loads

What it means. the fixture names an environment and nothing passes it to the application, so the expectations would be read against a setting the launch never applied.

What clears it. add the `flag` the environment reaches the application through, or carry it in `variables`. A value carrying the environment counts as carrying it.

More about this

Two places worth trying before anything else:

  • A run that answered 2 with assertions named as never run: that is a hole, and reading the verdict lists every condition that can cause one — the desk’s on one side and your application’s on the other.
  • A case the loader turned away: the refusal names the step it is about and what is wrong with it. Every field it could be talking about is on the case format, including which are required and which refuse a value that looks reasonable.

And if the refusal you met is not on either, it is worth opening an issue: a refusal somebody met and could not look up is the defect this page exists to close, and it is the kind this project most wants to hear about.