I have a pre build task that timestamps the assemblyinfo.cs for a project I'm working on.
Since this is a pre build event, each time a build is run the assembly info changes, which in turn causes ncrunch to run another build, which causes ncrunch to run another build and so on.
Is there a way I can get ncrunch to ignore assemblyinfo.cs?
Remco NCrunch Developer
#1366
08 Mar 2012 18:44 UTC
The best way to handle this would be to make sure you have the pre build task disabled. NCrunch usually disables these by default, but if you've implemented it with a custom target then you may need to add a condition to it:
<Target Name="BeforeBuild" Condition="$(NCrunch) != '1'">
....
</Target>
Generally speaking, it isn't good practice to have absolute file references within your solution as this can cause NCrunch to exhibit the recursive behaviour you've described. Another way to fix this would be to replace the absolute AssemblyInfo.cs reference with a relative path instead.
<Target Name="BeforeBuild" Condition="$(NCrunch) != '1'">
....
</Target>
Generally speaking, it isn't good practice to have absolute file references within your solution as this can cause NCrunch to exhibit the recursive behaviour you've described. Another way to fix this would be to replace the absolute AssemblyInfo.cs reference with a relative path instead.
Post a reply
Log in to reply.