The Crossbow Expert feat (PHB, pg. 165) says:
When you use the Attack action and attack with a one-handed weapon, you can use a bonus action to attack with a hand crossbow you are holding.
The description of the Versatile property (PHB, pg. 147) says:
Versatile. This weapon can be used with one or two hands. A damage value in parentheses appears with the property — the damage when the weapon is used with two hands to make a melee attack.
If I have a level 4 Ranger (and hence does not have Extra Attack) with the Crossbow Expert feat, and he only has a longsword in his hand at the start of his turn, can he take the Attack action and use it Versatile (i.e. with two hands), then let go of the longsword with one hand (sword still held in his other hand), use his free object interaction to draw a loaded hand crossbow (with his now-free hand) and fire it with his bonus action due to the above quote?
Note that this is not a hypothetical situation; I did this last night (although only once) during the game of an inexperienced DM, and I want to know if I'm gaining an unfair not-RAW advantage by doing this, and if so, stop doing it and let them know that I shouldn't be able to do this.
So there are two questions here, but I believe that they are inseparable*:
- The longsword is a one-handed weapon, but does using it Versatile mean that it is considered a two-handed weapon for that attack and thus disallow the above sequence of events?
- Given that I don't have the hand crossbow in my hand when I make the original attack with the longsword, does that disallow the above sequence because the feat specifies "a hand crossbow you are holding", even though I am holding it after the attack but before my bonus action?
* The reason I think these questions are inseparable is that, if I were to ask the "versatile" question on it's own, the "you are holding" part might be the only reason it doesn't work, but to ask that bit on its own has the obvious answer "why don't you just draw it before you make your attack?" and the answer is that I'm trying to use the sword Versatile first. Hence, these questions don't make sense separately, and I suspect they can both be answered at the same time with one concise answer.