When you publish a new provider hosted app using F5 - deployment, the new version of the app will be installed and a new ClientId will be generated. In addition that ClientId will automatically be saved in the Web.Config of the according Web-project.
Now I have a solution that has not only an app-project and a web-project, but also a few console applications that use the same mechanisms and configurarions and so also have a ClientId stored in their app.config.
Currently I have to manually copy the updated ClientId from the Web.Config to each App.Config of the console applications.
To avoid this I would like to use a fix ClientId (instead of a new one every time I redeploy the app). As an alternative, if the Clientid also is stored in the App.Configs automatically I would be happy, too.
I did not find where the ClientId-Web.Config-replacement takes place. If I could find that and could change it to also modify the other app.Configs that would be an alternative. But there seems to be nothing in the csproj-files.
TL;DR:
- I want to use a static ClientId on F5-Deployment on a Provider hosted app instead of a dynamic one
- (Alternative) How can I automatically store the ClientId not only in the web.Config but also in different App.Configs if (1.) is not possible