.NET Core: How to copy files to output folder?

Damir Dobric Posts

Next talks:

 

    

Follow me on Twitter: #ddobric



 

 

Archives

As .NET Developer you probably know Visual Studio option “Copy to Output folder”, which can be set on ever project file.

image


Because .NET core (at least for now) uses Project.Json file to coordinate the build process of the project, this option has to be specified in the Project.Json file.

In the final version of .NET Core 1.0 this is an option of “buildOptions” called copyToOutput.

"buildOptions": {

    "emitEntryPoint": true,

    "copyToOutput": [ "credentials.json", “AnotherFile.xy” ]

  },


Posted Aug 19 2016, 09:04 PM by Damir Dobric
Filed under:
developers.de is a .Net Community Blog powered by daenet GmbH.