Skip to content

Configurations and platforms

Steven Blom edited this page Sep 12, 2026 · 1 revision

Configurations and platforms

A design-time build is a build, so it obeys MSBuild properties. Most repositories declare Debug|AnyCPU and never think about it, but a solution is free to declare neither — an add-in built against four versions of a host API can name its configurations Debug-2024 through Debug-2027, x64 only, and derive TargetFramework from the configuration name. Loading such a solution as Debug|AnyCPU produces projects with no target framework and no references at all, and the thousands of diagnostics that follow name everything except the cause.

So the configuration is chosen rather than assumed. What you ask for wins; otherwise the solution's own declared list decides, and MSBuild's default is left alone unless the solution demonstrably does not offer it. The choice, the alternatives and the reason are all reported by workspace_status.

RoseMcp.Worker.exe --solution A.slnx --configuration Debug-2027 --platform x64
RoseMcp.Worker.exe --solution A.slnx --configuration Release --property RevitVersion=2027

A solution whose answer is always the same can commit it, in a rosemcp.json beside the solution or an A.slnx.rosemcp.json naming that one solution. That is the durable form of the same mechanism, and the reason to prefer it is the rule that no tool needs a setup call first: an agent that has to reload before its first useful answer has already lost to grep.

{
  "configuration": "Debug-2027",
  "platform": "x64",
  "properties": { "RevitVersion": "2027" }
}

rose_workspace_reload takes the same three, for changing them without editing a file — it restarts the worker, because MSBuild global properties are fixed when a workspace opens. They are remembered per solution, so a worker replaced later comes back under the same ones rather than silently reverting.

Scoped to one solution, and deliberately not found by walking up the tree. Configurations belong to a solution and not to a repository: one real directory holds a Revit add-in solution declaring Debug-2024 through Debug-2027 beside an installer solution declaring no build types at all, so a file above them would be wrong for one of the two. The solution-specific name is what a .DotSettings file next to them already does.

Where nothing is pinned and MSBuild's default is not on offer, the platform chosen is this machine's own architecture if the solution declares it, and the first declared otherwise -- a solution build takes the first configuration with the first platform, which is how a solution listing ARM64 first comes to build ARM64 on an x64 machine.

Arbitrary properties are supported because the derivation is sometimes from neither configuration nor platform. Restore gets the same properties as the load: a repository that moves BaseIntermediateOutputPath per configuration also moves where restore writes project.assets.json, and the two disagreeing leaves the assets file somewhere the load will not look.

Clone this wiki locally