Re: Question about setting Command Line Arguments from Project Properties
From: Chris, Master of All Things Insignificant (chris_at_No_Spam_Please.com)
Date: 12/21/04
- Next message: Daniel O'Connell [C# MVP]: "Re: .NET competes with java-script"
- Previous message: John Vottero: "Re: how to read application ".config" file in No-touch-deployment"
- In reply to: rforman1_at_optonline.net: "Question about setting Command Line Arguments from Project Properties"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 21 Dec 2004 16:20:27 -0600
You are mixing two different concepts. You can not do command line
arguments for compile time conditions. The code is already compiled and the
path of execution is already decided. I think you need to look at
condtional compilation contraints in teh Build section of configuration
properties.
Hope it helps
Chris
<rforman1@optonline.net> wrote in message
news:1103660512.376340.86210@c13g2000cwb.googlegroups.com...
>I have found many threads with this question asked and ostensibly
> answered, but none with an example of how exactly to do it. Help! I
> know that in order to set up the values of command line arguments from
> within the IDE, I go to Project Properties, Configuration Properties,
> and then the text box labeled "Command Line Arguments" under the label
> "Start Options." But what exactly do I put into that text box?
>
> What I want to do is set up a custom conditional-compilation variable
> that will act as a boolean, suppose I want to call it Test1, then I
> want to be able to use this code:
>
> #If test1 then
> messagebox.show "yes"
> #else
> messagebox.show "no"
> #End if
>
> ....so in order to define that "variable" or compilation constant I
> guess would be the right term, and set its value (let's say I want to
> set it True), what do I type into the Command Line Arguments text box?
> I've tried these, stabbing from what examples I could find but nothing
> happens:
>
> test1
> /test1
> test1=true
> test1=-1
>
> ....but it never seems to evaluate to True in the code statement. Am I
> close? (Also, by setting the variable in the IDE this way, it should
> take effect when I run my app in the IDE by pressing F5, right?, I
> mean, it's not like I have to compile to an .exe and then run that .exe
> to get it to take effect?)
>
> Thanks very much.
>
> richforman
>
- Next message: Daniel O'Connell [C# MVP]: "Re: .NET competes with java-script"
- Previous message: John Vottero: "Re: how to read application ".config" file in No-touch-deployment"
- In reply to: rforman1_at_optonline.net: "Question about setting Command Line Arguments from Project Properties"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|