Preheat the Oven: Preheat your oven to 350°F (175°C). Grease and flour a 9x5-inch loaf pan or line it with parchment paper for easy removal.
Cream Butter and Cream Cheese: In a large mixing bowl, beat the softened butter and cream cheese together until smooth and creamy. Add the sugar and vanilla extract, and beat until light and fluffy.
Add Eggs: Add the eggs, one at a time, beating well after each addition.
Mix Dry Ingredients: In a separate bowl, whisk together the flour, baking powder, and salt. Gradually add the dry ingredients to the wet mixture, mixing until just combined.
Fold in Cranberries and Pecans: Gently fold the cranberries and chopped pecans (if using) into the batter until evenly distributed.
Transfer to the Pan:
Pour the batter into the prepared loaf pan, spreading it evenly.
Bake: Bake in the preheated oven for 55-65 minutes, or until a toothpick inserted into the center of the loaf comes out clean.
Cool and Serve: Allow the loaf to cool in the pan for about 10 minutes, then transfer it to a wire rack to cool completely. Slice and enjoy as a snack, breakfast treat, or dessert.