Preheat the oven to 175 C. Lightly grease a 9x5 loaf tin, then line it with baking paper leaving a little overhang, and grease the paper again.
Spread the hazelnuts out on an ungreased baking tray and bake for 5 to 8 minutes until fragrant. If they have skins on, you'll see the skins splitting slightly.
Leave to cool until you can handle them, then lightly rub each one to get the skins off. This is important because the skins can give a bitter taste to the cake. Grind the skinned hazelnuts finely in a food processor. Set aside.
Sift the flour and baking powder with the salt, if using. Mix in the ground hazelnuts.
Keep the oven on at 175 C.
In a mixing bowl, beat the butter and sugar until light and fluffy. Add the eggs and vanilla and beat till combined.
Fold in the flour mixture in three additions. The batter will be thick and if it feels too thick, add a splash of milk to thin it out.
Spoon into the prepared cake tin, smoothen the top and bake for 35 to 40 minutes until a toothpick poked in the center comes out clean. Rotate the pan halfway through baking, covering with foil if the top is browning too quickly. Since all ovens are different, start checking for doneness at 25 to 30 minutes.
Allow to cool for 10 minutes, then lift the cake out using the overhang, and peel off the edges of the paper. Leave to cool completely before slicing. Dust with icing sugar for prettier tops! Happy eating!