Place the oven rack in the center position. Preheat oven to 375 degrees F (190 degrees C).
Beat sugar and margarine together in a bowl using an electric mixer on medium speed until creamy and smooth. Beat in eggs, 1 at a time, on high speed until incorporated. Mix in vanilla extract.
Mix flour, baking powder, and salt together in a separate bowl. Stir flour mixture, alternating with milk and ending with flour mixture, until just incorporated. Spoon batter into each ice cream cone, filling to within 1/2-inch from the top. Set filled cones on a baking sheet.
Bake in the preheated oven until a toothpick inserted in the center of the cake comes out clean, 15 to 20 minutes.