- Preheat your oven to 375°F (190°C) and line a baking sheet with parchment paper. 
- In a mixing bowl, combine the flour, cream cheese, granulated sugar, softened butter, salt, and vanilla extract. Mix until a dough forms. 
- Roll out the dough on a lightly floured surface into a rectangle about 1/4 inch thick. 
- Cut the dough into four equal squares. 
- In the center of each square, place a tablespoon of fresh raspberries and a teaspoon of cream cheese mixture (you can mix the raspberries with a bit of sugar if you prefer). 
- Fold the corners of each square towards the center to create a pocket, pinching the edges to seal. 
- Place the danishes on the prepared baking sheet and brush the tops with the beaten egg. 
- Bake for 20-25 minutes or until golden brown. 
- Allow to cool slightly before dusting with powdered sugar, if desired.