Bit of a showstopper for me, this. I've got 700 tests using a dynamic type but with the var keyword. Builds fine in VS and MonoDevelop, but not in NCrunch, which is treating the "dynamic" as "object". I suspect this is a known issue, but until it's fixed, I can't use NCrunch.
Remco NCrunch Developer
#2154
12 Jun 2012 22:24 UTC
Hi Mark,
Thanks for posting! I have heard reports of this problem although I've yet to be able to get my hands on a test solution that can reproduce the problem. Is there any chance you could send through to me a solution that can do this?
Cheers,
Remco
Thanks for posting! I have heard reports of this problem although I've yet to be able to get my hands on a test solution that can reproduce the problem. Is there any chance you could send through to me a solution that can do this?
Cheers,
Remco
Mark's talking about his Simple.Web project.
The git repository is: https://github.com/markrendle/Simple.Web.git
The git repository is: https://github.com/markrendle/Simple.Web.git
Remco NCrunch Developer
#2160
13 Jun 2012 07:32 UTC
Excellent thank you!
Remco NCrunch Developer
#2161
13 Jun 2012 07:43 UTC
I've just given this solution a spin. Unfortunately it didn't produce the problem described (all tests passed for me with one exception, which looked like an unrelated issue). I wonder if there may be something about this issue that's system related. Graeme - does the issue also occur for you?
Hi Remco,
It's not Simple.Web, it's Simple.Data that has the problems. http://github.com/markrendle/Simple.Data
Cheers,
Mark
It's not Simple.Web, it's Simple.Data that has the problems. http://github.com/markrendle/Simple.Data
Cheers,
Mark
Remco NCrunch Developer
#2171
14 Jun 2012 00:08 UTC
Hi Mark,
Thanks for posting the link to your solution. With this information, I've been able to isolate the issue and I can confirm that a fix will be in the 1.40b release due out in a few days time. Meanwhile I can suggest a couple of workarounds:
1. Add a parameter to each of the problematic methods that are returning a dynamic type. The parameter can be completely unused, but it will cause NCrunch's instrumention to work along a different code path and will prevent it from corrupting the assembly.
2. Turn off the NCrunch 'Instrument Output Assembly' configuration option for any projects containing problematic methods. This will also disable code coverage reporting for these projects.
It's somewhat surprising for me that this issue has existed for so long. I guess not too many people are writing parameterless methods that return dynamic types across assembly boundaries.
Cheers,
Remco
Thanks for posting the link to your solution. With this information, I've been able to isolate the issue and I can confirm that a fix will be in the 1.40b release due out in a few days time. Meanwhile I can suggest a couple of workarounds:
1. Add a parameter to each of the problematic methods that are returning a dynamic type. The parameter can be completely unused, but it will cause NCrunch's instrumention to work along a different code path and will prevent it from corrupting the assembly.
2. Turn off the NCrunch 'Instrument Output Assembly' configuration option for any projects containing problematic methods. This will also disable code coverage reporting for these projects.
It's somewhat surprising for me that this issue has existed for so long. I guess not too many people are writing parameterless methods that return dynamic types across assembly boundaries.
Cheers,
Remco
I think Simple.Data's Database.Open may be the only one. But more and more people are using it!
Looking forward to 1.40. NCrunch is like crack; I'm missing my hits.
Looking forward to 1.40. NCrunch is like crack; I'm missing my hits.
Remco NCrunch Developer
#2187
19 Jun 2012 04:28 UTC
For anyone interested, 1.40b has just been released including a fix for the above issue. Thanks again for the help in examining this problem.
Post a reply
Log in to reply.