Preheat oven to 350 degrees.
Line a 9×13 baking dish with parchment paper and lightly spray with cooking spray.
Combine butter and cream cheese with an electric mixer.
Add sugar and mix well.
Mix in the eggs and vanilla.
Add in flour, baking powder, and salt.
Mix well until dough forms.
Fold in candy corn.
Pour batter into pan and bake for 30 – 35 minutes or until edges are lightly browned.
Remove from oven and let cool completely *this is very important*
While the cookie is cooling, make the frosting.
For the frosting, mix all ingredients together until smooth.
Once the cookie is cooled, spread the icing evenly onto the cookie.
Sprinkle candy corn on top and cut into squares or bars.