Reputation: 3856
I need to include a file in my build output. This file is two folders above project.json. If I specify this using "../../"
, the config file is copied over, but to the wrong location. Instead of being copied over to /bin/Debug/net461
, it's placed two folders higher in /bin
.
How do I get a file in a parent directory to be copied over to actual output folder where the dlls are placed?
"buildOptions": {
"copyToOutput": { "includeFiles": [ "../../config.json" ] }
},
Upvotes: 0
Views: 718
Reputation: 6203
Try use this instead, it's tested way and working very well:
"buildOptions": {
"copyToOutput": "project.json",
"emitEntryPoint": true,
"preserveCompilationContext": true
}
You can use copy single file "copyToOutput":"name"
or array "copyToOutput":["name1","name2"]
. To copy directory need to use "copyToOutput":"name\\
"
Upvotes: 1