Copy content files to output directory of DNX Console app via project.json

后端 未结 4 2372
抹茶落季
抹茶落季 2021-02-19 22:56

I\'ve just started working with DNX 1.0.0-rc1-update1 in VS2015. My first app is a \'Console Application (package)\' project. Everything works, except NLog logging. I suspect it

4条回答
  •  闹比i
    闹比i (楼主)
    2021-02-19 23:32

    In the meantime, .NET Core RTM was published.

    Now, the current way to get stuff copied to the output folder is using the buildOptions section in project.json.

    There's the copyToOutput option which you can use like this:

    Before:

    {
      "version": "1.0.0-*",
      "buildOptions": {
        "emitEntryPoint": true
      },
    
      // more stuff
    }
    

    After:

    {
      "version": "1.0.0-*",
      "buildOptions": {
        "emitEntryPoint": true,
        "copyToOutput": { "includeFiles": [ "NLog.config" ] }
      },
    
      // more stuff
    }
    

提交回复
热议问题