Re: Determine whether App is running is Visual Studio

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Dmitriy Lapshin [C# / .NET MVP] (x-code_at_no-spam-please.hotpop.com)
Date: 04/19/04


Date: Mon, 19 Apr 2004 12:52:13 +0300

If we assume that you always use the Debug configuration to run the project
from the IDE,
you can use the following condition:

#if DEBUG
path = ".\..\..\..\myfile.rpt";
#else
path = "myfile.rpt";
#endif

-- 
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://www.x-unity.net/teststudio.aspx
Bring the power of unit testing to VS .NET IDE
"cody" <no_spam_deutronium@gmx.net> wrote in message
news:uGXuH$eJEHA.952@TK2MSFTNGP12.phx.gbl...
> Is there a way to do:
>
> #if APP_IS_RUN_IN_VS
> path = ".\..\..\..\myfile.rpt";
> #else
> path = "myfile.rpt";
> #endif
>
> I don't want to put the files into debug/bin dir since they woulbe be
> deleted on rebuilt then.
>
> --
> cody
>
> Freeware Tools, Games and Humour
> http://www.deutronium.de.vu  || http://www.deutronium.tk
>
>


Relevant Pages

  • Re: DllRegisterServer
    ... simply use Visual Studio 2005 IDE to build. ... I suspect regsvr32 invokes DllRegisterServer since I set the following ... option to yes in debug configuration, ...
    (microsoft.public.dotnet.languages.vc)
  • Re: how can I build an Image with all the compile optimization disable
    ... The debug configuration will disable the optimizations. ... OS design or ad a BSP to an existing one the IDE creates a debug and release ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Weird problem switching from debug to release mode.....
    ... Dmitriy Lapshin [C# / .NET MVP] ... Bring the power of unit testing to VS .NET IDE ... Everything was working fine under Debug mode and then I ... > compile showing the error message. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Debugging at the IL level
    ... > Is it possible to build a C# program in the Vs2003 IDE and debug it at the IL ... Microsoft .NET MVP ...
    (microsoft.public.dotnet.framework.clr)