user6058220
user6058220

Reputation: 15

How do I perform debug and release configuration builds

In previous .NET Core I could do the following:-

{
  "configurations": {
    "Debug": {
      "compilationOptions": {
        "define": [
          "DEBUG",
          "TRACE"
        ]
      }
    },
    "Release": {
      "compilationOptions": {
        "define": [
          "RELEASE",
          "TRACE"
        ],
        "optimize": true
      }
    }
  }
}

but it seems to be replaced by buildOptions but is a single configuration. What is the intended method now and how do I create this in the latest .NET Core?

Upvotes: 0

Views: 96

Answers (1)

Ignas
Ignas

Reputation: 4338

Simply replace compilationOptions with buildOptions

"configurations": {
  "Debug": {
    "buildOptions": {
      "define": [ "DEBUG", "TRACE" ]
    }
  },
  "Release": {
    "buildOptions": {
      "define": [ "RELEASE", "TRACE" ],
      "optimize": true
    }
}}

Upvotes: 2

Related Questions