Hi, thanks for sharing this issue.
The problem here is that the command line call to NSwag is causing runtime code within user assemblies to be executed at build time. There is no way we will feasibly get such a structure to run reliably under NCrunch.
To work around this, you need to disable your custom NSwag build target for NCrunch builds. To do this, simply extend the condition on the target to take NCrunch into consideration, as such:
<Target Name="NSwag" AfterTargets="Build" Condition="'$(Configuration)' == 'Debug' AND '$(NCrunch)' != '1'">
<Copy SourceFiles="@(Reference)" DestinationFolder="$(OutDir)References" />
<Exec Command="$(NSwagExe_Core31) run /variables:Configuration=$(Configuration)" />
<RemoveDir Directories="$(OutDir)References" />
</Target>