Update
Over a year later, and I finally realized the cause of this behavior. Essentially, an object can\'t be unboxed to a different type
In order to unbox the value, you must first have boxed it, and for the unbox to not throw you must have converted the value to the type you unbox it to before you boxed it.
However, as the type of the property setter is known, and you're dealing with value types, you shouldn't have to box/unbox at all:
E.g. if you wanted to call a property setter of type Int32
with an Int64
argument, it would go something like this:
// Int 64 argument value assumed on top of stack now
conv.i4 // convert it to int32
callvirt ...