I just reported SR‐14577, SR‐14578 and SR‐14579, which are Windows‐specific bugs that have a rather sweeping effect on SwiftPM’s usability. I started looking into fixing each of them, but it seems all three are either over my head or else it is not clear to me where the fix properly belongs.
IIRC, location of XCTest should be added to the PATH environment variable.
For the dynamic loader to locate it at runtime, yes. But that is not the issue here. To my knowledge, SwiftPM does not (and should not) add
Path entries to the importer search paths. In any case, it was properly registered in
Path when I encountered the problem (SR‐14579). It is more likely that SwiftPM or the Swift driver has not yet been taught the standard location of
XCTest, or that in contrast to other platforms the search path is only being added to test targets. I just do not know which component is supposed to be responsible for that.