Kevin McAvoy grew up a Yankees fan in upstate New York, where he also learned a thing or two about pitching in chilly conditions.

Now a Red Sox prospect, McAvoy has switched allegiances but retained his approach to early spring weather.

“You prepare for your start and go out there, and adrenaline really takes over,” he said. “You forget about the cold.”

His teammates and a sellout crowd at Hadlock Field gave him plenty of support in an 8-5 Sea Dogs victory Thursday night in their home opener against the Hartford Yard Goats.

McAvoy allowed only one hit through five scoreless innings as the Sea Dogs pounded out 12 hits for an 8-0 lead.

“We had a good crowd out there,” he said of fans (announced at 7,368) who welcomed professional baseball back to Portland for a 23rd consecutive season. “That definitely changes things, gets you excited to pitch.”

McAvoy (2-0, 2.53 ERA) was one strike from completing the sixth when David Dahl ended his outing with an RBI double to spoil the shutout.

“I got out of my mechanics a little bit trying to end the inning, trying to go for a strikeout,” said McAvoy, who allowed three hits, walked one, hit one batter and struck out five. “You learn from it and get better next time.”

The game started in brilliant sunshine under blue skies and a temperature of 49 degrees. There were pregame introductions, a jazz band on the brick patio outside the front gate, ushers offering a hand and friendly ‘Welcome back!’ greetings, and a field of grass more green than tan.

Despite an overnight bus ride back from Trenton that ended at 5:30 in the morning, the Sea Dogs came out swinging against Hartford right-hander Antonio Senzatela, rated ninth in the Colorado farm system by Baseball America.

They scored three in the first inning on hits by Aneury Tavarez, Raniel Rosario and Jake Romanski. Rosario wound up with two doubles and a single to raise his batting average 79 points to .296.

“The last couple games on the road I’ve been a little bit struggling,” said Rosario, a native of Puerto Rico who spent seven years in the Cardinals’ system before heading to Japan for two years. “I’ve been working hard and I saw the results tonight. I’m really happy because I’m contributing to the team.”

Senzatela departed after issuing a lead-off walk to Tzu-Wei Lin in the home third and having a trainer visit the mound.

“He just never really got fully loose,” said Hartford Manager Darin Everson. “It’s cold out so we’re not going to take any chances.”

The Sea Dogs doubled their lead to 6-0 in the fourth as Rosario and Tim Roberson doubled, and Henry Ramos and Jose Vinicio singled. They made it 8-0 in the fifth with help from a Jantzen Witte single and Romanski’s fourth run batted in, with a two-out single up the middle.

Dahl sparked Hartford’s comeback, adding a three-run homer in the eighth off Luis Ysla to make it 8-5. Ysla retired the next five batters before departing after three pitches to the game’s final batter, Zach Osborne. Rob Wort finished it off with a strikeout.

“He felt something in his arm,” Sea Dogs Manager Carlos Febles said of Ysla. “Hopefully it’s nothing serious. It’s cold so you have to be careful with pitchers.”

The Sea Dogs are 11-12 in home openers, thanks in large part to the kid from the snow belt of New York who got them off to a hot start on a cold night.

“He threw everything for a strike,” said Romanski, the Sea Dogs’ catcher. “Whatever I wanted he threw. He was awesome.”

Portland’s 13 hits marked the fourth time in eight games the Sea Dogs (4-4) have reached double digits in hits. They are 4-0 when doing so.

“After getting in (so early) this morning,” Febles said, “watching them swing the bats the way they did was impressive.”