How do I say that something must happen or another thing, not both, in one simple sentence?
You don't want as opposed to here: A as opposed to B means A (only), not B.
There are several ways of saying what you want; one may be more graceful than another in a particular context, but any of them will work:
Either [this property] must be set, or [property X], but not both.
You must set either [this property] or [property X], but not both.
You must set exactly one of [this property] and [property X].
Set one, but not both, of [this property] and [property X].
Select one property to set: [this property] or [property X].
I don't think "as opposed to" does what you want here. Instead of "one or the other, but not both," it means "this one, not that one."
How about: The property must be set as either X or Y. ("Either" suggests that the "or" isn't inclusive.)