Ensure the current credentials are used when launching ASP.NET projects
When launching ASP.NET projects locally, if the project is using the useable auth library it will pick up the credentials to use, the application_default_credentials.json file, that is generated by GCloud CLI. We want to ensure that the app will instead pick up the credentials for the current user selected in Visual Studio.
In order to do this we need to set the environment variable GOOGLE_APPLICATION_CREDENTIALS to point to a file of our creation which will contain the credentials for the currently selected user. This file will be overwritten every time the current user is changed in Visual Studio.
Because it is an env variable it will be inherited by the child process (created when the app is started by Visual Studio) so we will set that variable in Visual Studio's own environment.