Which class to exp the whole game?
As far as I know, as a mesmer you’ll be welcome in any dungeon party.
(people say that) Mesmer is also very good on WvW and I have fun doing PvE as a mes.
I play Minion Master necro and it’s great for PvE, for PvP condition or power build would be better (not my opinion, I don’t play PvP).
the best advice I can give you is to find a good guild. If you’re getting discouraged from running stuff on your ranger, you just need a new crowd to run with.
Warriors, mesmers, and guardians are always popular.
Though to be perfectly honest, if you find yourself in a group that says, “ONLY X CLASS!!!” then you’re better off finding another one. I have run scale 38 fractals at least a dozen times, and have never had ANY of my all-pug parties reject someone based on class. We have said that we would prefer to have a heavy-profession join if we had four light/mediums, but if an elementalist joins, I’ll toss out a, “Is this team composition fine for everyone?” And everyone just says, “r.”
Someone who can play their class well is much better and more helpful to the team than an average player. And you should find the class that matches your playstyle the most. If you start doing things that aren’t fun for you, then playing will become like a chore.
The only exception to what I’ve said is probably CoF path 1. If your goal is to speed farm for very long periods of times, and as quickly as possible, then you may want to make a warrior/mesmer so that you can join like-minded groups. There are tons of CoF 1 farms with a mix of classes, but they will always be a minute or two slower than all warrior/mesmer groups. If that minute matters to you, then take the hours and hours to level a warrior/mesmer to 80, or the gold to power-level/gear them.
Rangers are pretty awesome in dungeons btw. Pet aggro/res/cc, healing fields, cripples and immobiles are pretty amazing.