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

后端 未结 4 2361
抹茶落季
抹茶落季 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条回答
  •  面向向阳花
    2021-02-19 23:35

    Use copyToOutput inside buildOptions:

    {
      "buildOptions": {
        "copyToOutput":  "NLog.config" 
      }
    }
    

    or for multiple files declare an array:

    {
      "buildOptions": {
        "copyToOutput":  ["NLog.config", "testdata\\"]
      }
    }
    

    To copy a directory remember to add the trailing \\.

提交回复
热议问题