Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Ignore changes to AssemblyInfo.cs
ilivewithian
#1 Posted : Thursday, March 8, 2012 11:43:40 AM(UTC)
Rank: Newbie

Groups: Registered
Joined: 3/8/2012(UTC)
Posts: 1

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
#2 Posted : Thursday, March 8, 2012 6:44:59 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,138

Thanks: 795 times
Was thanked: 1050 time(s) in 1000 post(s)
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.
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.022 seconds.