Hmm,

Actually it is working fine for me now after I fixed it. I don't know
if I made it clear. All I need to do was to apply the changes I
mentioned to the latest trunk and build RM with FOR_NET_2_0 targeting
3.5.

Then I used my own built RM (with latest fix from Krzysztof for DP) in
my project's build targeting to .NET 2.0, it worked perfectly fine. I
can use the extension methods without any problem under VS2008 and the
C# 3.0 compile.

All I'm saying is having reference to System.Func delegate breaks the
RM itself FOR_NET_2_0 build. In the RM, there is already a delegate
defined called Function which is supposed to be used in this case, as
RM 3.5 code base actually has no true dependency to any 3.x libs
except the two I mentioned.

Hope I have made myself clear :)

Cheers,
Kenneth

On Sat, Jul 4, 2009 at 12:39 PM, Tim Barcz<[email protected]> wrote:
> Targeting 2.0 will have problems....you can't use extension methods and what
> not.  My recommendation to others has been to use 3.5 where possible and if
> not possible then stay on older version of RhinoMocks < 3.5
>
> Make sense?
>
> On Sat, Jul 4, 2009 at 11:37 AM, Kenneth Xu <[email protected]> wrote:
>>
>> Hi Tim,
>>
>> When I target to the 2.0. It failed because the Func delegate doesn't
>> exist in Net 2.0.
>>
>> I changed
>>        public static void AssertWasCalled<T>(this T mock, Func<T,
>> object> action)
>>    and
>>        public static void AssertWasCalled<T>(this T mock, Func<T,
>> object> action, Action<IMethodOptions<object>> setupConstraints)
>>
>> To
>>        public static IList<CallRecord> AssertWasCalled<T>(this T
>> mock, Function<T, object> action)
>>    and
>>        public static IList<CallRecord> AssertWasCalled<T>(this T
>> mock, Function<T, object> action, Action<IMethodOptions<object>>
>> setupConstraints)
>>
>> in the RhinoMocksExtensions class to fix the issue.
>>
>> Cheers,
>> Kenneth
>>
>>
>
>
>
> --
> Tim Barcz
> ASPInsider
> http://timbarcz.devlicio.us
> http://www.twitter.com/timbarcz
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Rhino.Mocks" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/RhinoMocks?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to