Copying files at compilation for the Asp.net Core 1.0 project

I am creating REST Api with Asp.Net Core 1.0, and I want to copy a file that is not part of the project to the output path when compiling the project.

I can’t figure out how to do this. I tried using "buildOptions: copyToOutput" without any success. I can not understand the link to project.json found here: https://docs.microsoft.com/en-us/dotnet/articles/core/tools/project-json

Say that I want to copy the file ... \ TestFolder \ Test.config to the output folder of the current project. How can i do this?

+4
source share
1 answer

, buildOptions .

"buildOptions": {
    "copyToOutput": [
       "../../../copyme.txt"
    ]
}

, project.json. :

Root folder:
-copyme.txt
-WebApplication\src\WebApplication\project.json
+4

Source: https://habr.com/ru/post/1656092/


All Articles