how to disable #if DEBUG in C# at Win 7 visual studio 2012

后端 未结 3 1055
慢半拍i
慢半拍i 2021-01-23 10:41

I am working on C# in Win 7 visual studio 2012.

I have #if DEBUG and I want to disable them. But, when I run C# in Visual Studio with \"start without debug

3条回答
  •  后悔当初
    2021-01-23 10:58

    "Start without debugging" only means that VS will not attach the debugger to the running process; it doesn't change anything else. You're probably running using the Debug configuration - if you want to compile in Release, you should choose Release from the dropdown in the toolbar, where you should currently see a dropdown set to Debug.

    Visual Studio creates these configurations for your project to start, which control what preprocessor flags are set to, as well as a bunch of other configuration (how much optimization to use, etc.). You can edit them if you want, or even create new ones.

提交回复
热议问题