
Explanation/Reference:
Explanation:
Simple: Means this task would needs to be complete before the Role Starts. If task will not complete and exit, the Role will stuck to wait till the task completion. Simple tasks run until they exit, and then the next task (or the RoleEntryPoint if this is the last startup task) is executed.
Incorrect Answers:
Background: This task would be independent from the Role itself. First startup task will execute and immediately after the Role, and even when this task is not completed, the Role will start separately from the startup task.
Foreground: The startup task will run and then Role will start so it does behave same way as the background task, however the role will stay running as long as startup task is running. You can choose it, if you want the role instance to stay up as long as the task is running. Also the role shutdown can only happen when all the foreground tasks exit.
References: https://blogs.msdn.microsoft.com/avkashchauhan/2011/03/17/using-startup-task-in-windows- azure-detailed-summary/