Spraying in vacuum or in an inert atmosphere