Search code examples
visual-studiopublishbuildconfigurationpublish-profiles

Visual studio publish profiles and its configurations


I'm trying to get a better understanding of visual studios build configurations.

I'm currently building out a webAPI. I am also using team city for some automated build tasks and so I use a different profile for that instead of the debug profile that I use locally. This team city profile also has its own configuration (I'm using it for transforms). Because I use this configuration, I am unable to attach to it (it has error I can't reproduce locally).

Is there a way to use a custom configuration while building out all the symbols and debug data that the debug configuration has so I can still attach. I've tried finding more information by searching but I can't seem to find the right info I'm looking for. Perhaps a cleaner explanation of profiles and configurations would help.


Solution

  • If I correctly understand your question you want to enable debugging symbols in a build configuration other than Debug.

    To achieve that, right click on your project, open its Properties, and switch to the Build tab:

    enter image description here There you can tick the checkbox to Define DEBUG constant and untick Optimize code which should enable you to properly debug your build even when using a build configuration that's not Debug.