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

Notification

Icon
Error

Defaul argument makes NCrunch build fail
marhoily
#1 Posted : Sunday, September 2, 2012 5:47:53 PM(UTC)
Rank: Member

Groups: Registered
Joined: 9/2/2012(UTC)
Posts: 13

Thanks: 3 times
Was thanked: 1 time(s) in 1 post(s)
Here is the sample project that makes NCrunch build fail:

https://dl.dropbox.com/u...rtableClassLibrary1.zip

Summary:

VS 2012 RTM
Portable library .NET 4.5 + Silvarlight

Function arguments with default values of type Func`2 crash NCrunch build with mono.cecil stack trace:

public void F(Func<int, int> arg = null) { }

P.S. Didn't find an issue tracker. Use one, dude
P.P.S. Didn't find forum search either.
Remco
#2 Posted : Monday, September 3, 2012 5:05:39 AM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,123

Thanks: 957 times
Was thanked: 1286 time(s) in 1193 post(s)
Hi, thanks for sharing this issue!

Right now NCrunch doesn't officially support working with Silverlight projects, although I've placed this issue on the backlog for review when Silverlight support is eventually added.

An another note, this website will be getting a major upgrade soon. The issue tracker is still a way out though the forum search options will be made more accessible.


Cheers,

Remco
marhoily
#3 Posted : Tuesday, September 4, 2012 11:35:17 AM(UTC)
Rank: Member

Groups: Registered
Joined: 9/2/2012(UTC)
Posts: 13

Thanks: 3 times
Was thanked: 1 time(s) in 1 post(s)
Thank you for your effort.

It's just a little confusing with portable libraries if they silverlight or not. I guess from the .NET CLR point of view the library is .NET library, not Silverlight. Isn't it?
Remco
#4 Posted : Tuesday, September 4, 2012 9:49:38 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 7,123

Thanks: 957 times
Was thanked: 1286 time(s) in 1193 post(s)
VS2012 doesn't really make this as obvious as it was in VS2010, but the portable library options revolve around both Modern/Metro and Silverlight. After switching off the portability, the project built in NCrunch without problems.

Silverlight projects use the same form of MSIL as other .NET assemblies (so they are still .NET binaries), but they are linked against different versions of the base .NET assemblies (i.e. System.dll).

So basically, the portable libraries have different requirements for the CLR assemblies that are loaded into their application domain. The assembly resolution logic in NCrunch causes Cecil to become confused between these libraries, causing exceptions to be thrown during instrumentation. It's something I hope to resolve in the not too distant future :)

Cheers,

Remco
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.042 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download