7
votes

I have an asp.net core 1.0.0 app in VS 2015 Update 3 with two appsettings-- appsettings.Development.json and appsettings.Production.json. I'm trying to use VS to publish my app into Azure and I need for it to use the configuration in appsettings.Production.json. However I can't seem to get it working. It doesn't even seem to use the development json-- just the base appsettings.json which doesn't have anything.

So how do I get the VS publishing to work in Azure using the appsettings.Production.json configuration?

2

2 Answers

6
votes

Have a look at the following blog post:

http://asp.net-hacker.rocks/2016/03/21/configure-aspnetcore.html

It talks about using environment specific configurations. It appears that the concepts of transforms was not brought over yet.

4
votes

In project.json, ensure that publishOptions/include contains appsettings.Production.json.