Reputation: 3239
I'm using Asp.net Core version 1.0.0-preview2-003131
in VisualStudio 2015.
The strange part is , even though my appsettings.json
is added in publishOptions
, it is not generated during Debug. However, it will be generated in Release version.
I'm using Visual Studio to compile and debug, not command.
My Project.json:
"publishOptions": {
"include": [
"appsettings.json"
]
}
UPDATE: Below is my BuildOptions in Project.json:
"buildOptions": {
"emitEntryPoint": true
},
Even by adding "debugType": "full"
does not help to resolve this
UPDATE: Until today I'm no longer use VS 2015 anymore. Thank you for following up on this so far.
Upvotes: 2
Views: 1070
Reputation: 1109
Do it like this:
"publishOptions": {
"include": [
"appsettings.json",
"appsettings.Production.json",
]
},
This lists all the files and folders that will be included when you publish.
Upvotes: 1
Reputation: 1109
You can try by adding appsettings.Production.json
into this array of publishOptions
.
Upvotes: 1