I didn't read everyone's response so this may have been covered already. You really need to know what type of riding you are going to be doing.
You can basically break it down into three categories, of course this could probably be debated and is just a generalization.
*XC (long distance, mostly singletrack with some technical climbing and descending, but nothing too chunk or gnarly)
*Trail (shorter distance, mostly climbing up to go back down, downs are fun, fast, flowy, can be chunky, drops, jumps, etc..)
*Downhill (shuttle or lift to top of hill and bomb back down, most of the trails back down you would question if a normal person actually rides that shit on purpose)
*XC - hardtail - 29" most likely, 27.5" is fine. Full Suspension - shorter travel front and rear
*Trail - Full Suspension - Longer travel front and rear. More Slack front which allows you to point and shoot without much issue. You can get by with a hardtail, but you will have more fun on a longer travel full suspension.
*Downhill - Long travel, slack front end, can suck up large hits, but will be a bitch to pedal uphill.
I ride a 29+ hardtail with a 140mm travel front fork and most of my riding is what I would consider a mixture of XC and Trail riding. I usually do 4+ hour rides over singletrack and I love technical rocky descents and will climb up multiple times to hit a sweet flowing trail back down. I am typically riding with others on shorter travel full suspension bikes and we are all mostly into more endurance type riding and events; however, I do ride with a few friends who are on longer travel bikes and jump off of anything that we come across.
The frame geometry is critical as far as how it reacts and feels. However, the real money and weight savings is in the wheels and fork. Buy the lightest and best wheels and fork that you can afford. But a good set of rolling tires and set them up tubeless.
I am not a big fan of 27.5 or 27.5+ hardtails, I would rather have the 29 or 29+ on a hardtail because the 29" seems to roll better; however, I have a friend with a 27.5 hardtail running 2.6" wide tires and he loves it and has no problem keeping up on the flats or climbs and he has a blast on the descents. I believe he is running a Fox Fork set up at 130mm.