It took a couple of years for me to work out a recipe that didn't go runny, but this one really does work. Ideal for a carrot cake, this is just about enough for 20x30cm traybake. After numerous disasters and experiments, this one is my tried and tested version.
Soften the butter in a microwave: you don't want it melted, but it does need to be very soft. Then whisk it or use electric beaters to get it to a very flexible and even consistency.
Add the orange juice (which is nice for a carrot cake) and beat that in too. Then add the icing sugar and beat that into get a very soft buttercream icing.
Add the cream cheese in one go. It absolutely must be full fat (I use Sainsburys organic as it it lower in salt than Philly) and carefully blend this in. Do not beat it, just slowly mix it in with a wooden spoon.
Depending on how melted the butter was, you may want to put it in the fridge for 10 minutes at this point, but if it has gone a bit runny this will definitely firm it up again due to the amount of butter in the mix. However, it should be perfectly spreadable at this point, and will not run off the cake!