detect build type in c#

  • Thread starter Thread starter Maneesh
  • Start date Start date
M

Maneesh

Is there a way in C# to detect which build the current run is in (debug
or release).
I have a scenario where the path of a file I access changes depending
on build type.
 
I used 'System.Diagnostics.Debugger.IsAttached'
Works like a charm...thanks a lot.

regards,
Maneesh
 
That probably won't work if you simply run the code outside of Visual Studio
but it was, nonetheless, built from the Debug configuration. But then,
perhaps that's exactly what you need -- to know at runtime whether you
actually are debugging or not -- not which configuration was used to build
the code.

-- TB

Maneesh said:
I used 'System.Diagnostics.Debugger.IsAttached'
Works like a charm...thanks a lot.

regards,
Maneesh
 
Back
Top