Build/Test Issues

Reducing CodeAnalysis build time

Started by dvircohen on 2,623 views

Hi,

We enabled CodeAnalysis in our solution, we saw that it adds about ~1.5 minute to the build time on the build server.
We thought maybe to let MSBuild build the solution with the CodeAnalysis, and in parallel ncrunch will build and test (without CodeAnalysis enabled).
We got the following error:
MSBUILD : error MSB4166: Child node "23" exited prematurely. Shutting down. Diagnostic information may be found in files in the temporary files directory named MSBuild_*.failure.txt.

We actually couldn't find this MSBuild_*.failure.txt file :/

Do you know how to solve this issue? do you havbe a better way to perform CodeAnalysis?
Any other way to enhance build and test performance on the build server using NCrunch Console tool?

Thanks.

Edited

Hi,

Thanks for sharing this issue.

The problem you're experiencing is due to limitations in the design of MSBuild and its targets. MSBuild cannot safely build a solution in parallel with another session. Because NCrunch does also use MSBuild when loading projects, naturally this clashes with the other build call you're making. It might be possible to work around this by running these steps over physically separate copies of the solution, though I cannot guarantee whether you might then experience other problems with shared global state.

CodeAnalysis unfortunately has serious performance issues. This is why the options were included to turn it off :(

Edited

Post a reply

Log in to reply.