If it's a one shot roll I will just give out the target number.
If it is something that can be tried multiple times (like trying to hit an enemy) then I prefer not to give the target number. This is especially the case if the characters can cast spells/use items that would give them modifiers to reach the target number. They shouldn't know the exact amount of resources to expend.
Of course, there are always exceptions... I might make an exception if the character has an appropriate skill or knowledge. I feel it is appropriate to give them a rough idea, i.e "The lock doesn't look too complex", or "you're pretty sure the monster's hide is too tough for your blade".
If it is something that can be tried multiple times (like trying to hit an enemy) then I prefer not to give the target number. This is especially the case if the characters can cast spells/use items that would give them modifiers to reach the target number. They shouldn't know the exact amount of resources to expend.
Of course, there are always exceptions... I might make an exception if the character has an appropriate skill or knowledge. I feel it is appropriate to give them a rough idea, i.e "The lock doesn't look too complex", or "you're pretty sure the monster's hide is too tough for your blade".