Forum member
ncrunchuser1
13 posts
Posts by ncrunchuser1
-
Potential bug in metrics
Hello, I think I've run into a bug in the metrics. I'm testing a project that uses ConditionalAttribute. Unfortunately, NCrunch doesn't allow running multiple configurations of the same project so I have to create two separate test projects, one with the #define and one without. In order to no…
03 Sep 2017 15:12 UTC
-
Build fails with VS 2015 RTM
[b]Update on this:[/b]. I did change to use the $(NCrunch) variable as Graham suggested. A couple of behaviors to be aware of if you use this: [list] [*]You need to save the .feature file in order for NCrunch to pick up the latest changes [*]If you add the generated test file as a [b]link[/…
04 Aug 2015 18:43 UTC
-
NCrunch strips out conditional defines
Thanks Remco. Normally I would leave it off. This set of tests is for a library I created to allow switching between Code Contracts and legacy if-then-throw and asserts so unfortunately, I need it on.
02 Aug 2015 13:41 UTC
-
NCrunch strips out conditional defines
I did get the "Fail build on warnings" setting to work - there was another setting, "Check in background" that needed to be unchecked. Once this was on, turning on the NCrunch setting "Allow static code contract checking" fails the test with the following: [code=bash] NCrunch experienced an une…
02 Aug 2015 03:52 UTC
-
NCrunch strips out conditional defines
Which two settings are you referring to? If you are talking about the Code Contracts page and the "Perform Static Contract Checking" and "Fail build on warnings", they are both checked. When I close the page and re-open it, the "Fail build on warnings" setting is grayed out (but still checked). T…
02 Aug 2015 03:07 UTC
-
NCrunch strips out conditional defines
Remco, I tested the "Allow dynamic code contract checking" setting and got the following results: [list=1] [*]Calling Contract.Requires() - NCrunch shows an assert dialog [*]Calling Contract.Requires<E>() - NCrunch shows a dialog that Code Contracts needs to be enabled [/list] I'm not su…
01 Aug 2015 20:49 UTC
-
NCrunch strips out conditional defines
I didn't check if it affected the operation of Code Contracts - my code is doing the standard " '$(var)' == 'False' " - which is why I caught it. It's possible their code only checks for 'True' and since NCrunch only ever sets to 'false' (at least that's what I've deduced), it would be OK. I'm in …
30 Jul 2015 03:49 UTC
-
Build fails with VS 2015 RTM
I see there's no .targets file but I found the info about it and other environment variables in the online help. Guess I should read the manual more often :) Thanks again!
29 Jul 2015 18:30 UTC
-
NCrunch strips out conditional defines
Remco, I did find an inconsistency between NCrunch and Code Contracts. The "Perform Runtime Contract Checking" and "Perform Static Contract Checking" options are written by Code Contracts as: [code=xml]<CodeContractsEnableRuntimeChecking>True</CodeContractsEnableRuntimeChecking> <CodeContrac…
29 Jul 2015 18:26 UTC
-
Build fails with VS 2015 RTM
Thanks Graham! I didn't know about that NCrunch parameter (guess I need to take a look at the NCrunch .targets file). That will come in handy in the future for sure!
29 Jul 2015 15:37 UTC
-
NCrunch strips out conditional defines
Thanks Remco! You pointed me in the right direction and I figured it out after some digging. There were two issues. [b]1. Using the incorrect relative path to import the .targets file[/b] The .targets file is located in the solution folder. I had the import as: [quote]<Import Project="[…
29 Jul 2015 15:04 UTC
-
NCrunch strips out conditional defines
I created a .targets file that is to be imported into .csproj files. This .targets file adds conditional defines based on settings it finds in the project file. I imported this into the .csproj of a test project that verifies that the defines are set correctly but NCrunch is stripping out the ne…
29 Jul 2015 02:50 UTC
-
Build fails with VS 2015 RTM
Project builds fail with the following message "..\packages\SpecFlow.1.9.0\tools\TechTalk.SpecFlow.targets (47, 5): Unable to cast object of type 'System.Xml.XmlComment' to type 'System.Xml.XmlElement'.". The same project worked fine with VS 2015 RC but broke after upgrading to VS 2015 RTM. The …
21 Jul 2015 12:30 UTC