Hi Richard, very strange - at least at my trunk (https://github.com/alaendle/rhino-mocks) all existing Rhino.Mocks tests are succeeding if I switch only the test project to .net 4.5. Could you please provide an example of a test running under .net 3.5, but fails on .net 4.5 - this would make error tracking a lot easier ;-)
Br, Andreas Am Montag, 19. November 2012 21:12:26 UTC+1 schrieb Richard Foster: > > I am starting on a new project, and the plan is to reuse several > well-tested components from other projects, but rebuild them so the entire > solution targets the same version of the .NET runtime. > > After switching the legacy project from .NET framework version 3.5 to 4.5, > several previously passing tests have started to fail, specifically by > throwing an InvalidOperationException with the message "This action is > invalid when the mock object is in a verified state". The exception is > being triggered when a class unsubscribes from an event (in the case of the > tests, one that is raised by a mock object) as part of the referencing > object's "Dispose" processing. > > The problem is seen using both RhinoMocks v3.6 (which was what the > "legacy" component used previously) and v3.6.1. > > 1) Is unsubscribing from an event handler during the "Dispose" processing > an appropriate thing to do? > > 2) Under normal (non-mock) circumstances, is there any situation in which > removing a subscription to an event would cause an exception? > > 3) What changed in the event processing which may have led to this failure? > > Regards, > Richard > -- You received this message because you are subscribed to the Google Groups "Rhino.Mocks" group. To view this discussion on the web visit https://groups.google.com/d/msg/rhinomocks/-/rpTZBKogqJ4J. 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.
