16 ounces (2 bars) full-fat cream cheese, softened at room temperature for at least 1 hour
1/4 cup all-purpose flour
1 cup white sugar
1/4 teaspoon salt
1 cup whole milk
1 teaspoon vanilla
Place the softened cream cheese in the bowl of a stand mixer (or simply use a large bowl and hand beaters). Whip the cream cheese on high speed for several minutes, until it is completely smooth and silky. Scrape the cream cheese out into a separate bowl and set aside.
Whisk the flour, sugar, and salt together in a small saucepan. Turn the heat on to medium and slowly add the milk, whisking constantly. It will look lumpy at first but whisk vigorously to create a smooth paste. Continue whisking as the mixture comes up to a simmer. It will thicken rapidly and dramatically as it comes to a boil (see photo below). Simmer for 1 full minute, then turn off the heat. Scrape the flour and milk paste into the mixer bowl. (If you want to be 100% sure there are no small lumps, pour it through a mesh sieve.)
Turn on the mixer or beaters and whip the flour-milk mixture for 10 minutes, or until it is lightened and no longer piping hot. It should be lukewarm or cooler. Slowly add the whipped, softened cream cheese, whipping constantly. Add the vanilla. Continue whipping until the the two are completely combined and smooth and silky. (See photo below.)
It is best to let this icing firm up a bit more in the refrigerator but you can use it now to ice a completely cooled cake. If not using immediately, store in the fridge for up to 3 days. Whip again briefly on high speed before using. It is also best to refrigerate cakes that are iced with this frosting. It is best eaten within three days or so.
courtesy of http://www.thekitchn.com