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

Notification

Icon
Error

Code Contract configuration, works in 1.38.19b but not in 1.39.15b
SolaAesir
#1 Posted : Thursday, June 14, 2012 7:15:36 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 6/14/2012(UTC)
Posts: 3
Location: Twin Cities, MN, USA

I'm using nCrunch with nUnit and code contracts. With no changes to the code I can run with 1.38 and the tests all run without issues (with both passing and failing tests), under 1.39 I get a message "Must use CCRewriter..." similar to this post. The nCrunch build is *much* faster under 1.39 than under 1.38 but 1.38 seems to have an issue where CCcheck.exe appears to hang for 30-60 seconds on each project before continuing when built under nCrunch (doesn't happen during the normal build) so it might just be that the issue causing that was fixed.

Another option is that
Code:
	<PropertyGroup Condition=" '$(NCrunch)' == '1' ">
		<CodeContractsRuntimeThrowOnFailure>True</CodeContractsRuntimeThrowOnFailure>
	</PropertyGroup>

in my project files is no longer taking effect.

Are there any changes to configuration in 1.39 I should be aware of? I can work just fine using 1.38 but the faster build times in 1.39 would be very nice to have.

Thanks.
Remco
#2 Posted : Thursday, June 14, 2012 9:28:52 PM(UTC)
Rank: NCrunch Developer

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

Thanks: 929 times
Was thanked: 1256 time(s) in 1169 post(s)
Hi, thanks for posting!

1.39b saw the introduction of a new configuration setting to turn off code contracts for NCrunch. By default, code contracts are disabled. Since the 1.39b release, there's been quite a bit of feedback from other people that have a similar situation to you (i.e. their code requires the dynamic contracts but not the static contracts), so in the upcoming 1.40b release this option will be split in two - one for static checking, and one for dynamic checking.

1.40b should be out within a few days, until then I recommend adjusting the code contracts configuration option on your project-level NCrunch configuration so that you can continue to work with 1.39b.


Cheers,

Remco
Remco
#3 Posted : Tuesday, June 19, 2012 4:26:46 AM(UTC)
Rank: NCrunch Developer

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

Thanks: 929 times
Was thanked: 1256 time(s) in 1169 post(s)
For anyone interested, 1.40b has just been released with the above mentioned configuration changes, so hopefully this should no longer be an issue for the latest version of NCrunch.
SolaAesir
#4 Posted : Tuesday, June 19, 2012 8:41:28 PM(UTC)
Rank: Newbie

Groups: Registered
Joined: 6/14/2012(UTC)
Posts: 3
Location: Twin Cities, MN, USA

1.40b did indeed fix the issue. Thank you.
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.041 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download