I just know the whole 2.0 thing is tenuous at best. I know there is compiler switches and stuff, but if you actually try to use the framework in 2.0 there are issues, the project file for example doesn't even compile.
I worked with a guy for quite awhile a few months ago to get him up and going and in the end it was a LOT of work to actually get this going in 2.0 in 2005. On Mon, Jul 6, 2009 at 9:30 AM, Kenneth Xu <[email protected]> wrote: > > Hi Tim, > > In a VS2008 project that uses RM (NOT RM itself), I target the build > to framework 2.0 by... > - right click on project > - select properties in the context menu > - under the Application tab, change target framework to 2.0. > > RhinoMocks download page No. 4 (at this moment): > Rhino-Mocks-net-3.5-v3.5-for-2.0.zip (111875 bytes) Rhino Mocks 3.5 - > For .Net 2.0 > 04/10/2008 18:25:00 Published by Ayende Rahien Number of downloads: 5727 > > That build was created from the same code base with FOR_NET_2_0 > condition enabled. And worked fine with my 2008 target 2.0 project > until I recompiled RM with DP fix. I was able to build RM with > FOR_NET_2_0 condition enabled, but as soon as I drop it into my test > project. It failed with Func delegate. I change the Func to Function > delegate inside the RM source and compiled again, then everything is > in peace :) > > It's a simple change, change from Func to Function. > > Let me know if you have any further inquires. > > Cheers, > Kenneth > > On Mon, Jul 6, 2009 at 9:18 AM, Tim Barcz<[email protected]> wrote: > > Correct. > > > > Nor does 2005 support extensions. The compatible with 2.0 feature is > > strange....AAA Can't work with 2005 and I believe support for 2.0/2005 > was > > dropped awhile back. > > > > Tim > > > > On Mon, Jul 6, 2009 at 7:11 AM, Kenneth Xu <[email protected]> wrote: > >> > >> 2008. > >> > >> 2005 doesn't support lambda. > >> > >> Sent from my Verizon Wireless BlackBerry > >> > >> ________________________________ > >> From: Tim Barcz > >> Date: Sun, 5 Jul 2009 22:28:32 -0500 > >> To: <[email protected]> > >> Subject: [RhinoMocks] Re: Ordered Expectation for AAA - Feature request > >> with patch > >> Are you running this in 2008 or 2005? > >> > > On Sat, Jul 4, 2009 at 1:15 PM, Kenneth Xu<[email protected]> wrote: > > 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 > >> > >> > >> >> > >> > > > > > > -- 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 -~----------~----~----~----~------~----~------~--~---
