locked
Command Line Argument RRS feed

  • Question

  •  I have problem to find the way to specify command line argument when running the program in MCVC#EE2005. First of all I couldn't find the vsvars32.bat to set the appropriate environment variables to support command line builds. Therefore, I compile and run my code in  MCVC#EE2005 environment. I need to enter the following at the command line: listit  listit.cs. How do I specify that "listit" argument? 

    Thank you for your time!

     

    Tuesday, March 28, 2006 5:38 PM

Answers

  • hi,

    first of all you have to make your system recognize the csharp compiler you can find out how in this thread

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=214158&SiteID=1

    2) to complie your application you use "comand line:>csc myclassName.cs" but to run your application you use "comandline :>myclassName.exe". so one step to compile and other step to run your application, you can use the .cs source to identify the args you have to use the exe

    3) to set  the args for your application main method in command line you use something like this "command line:>myclassName.exe listit"

    hope this helps

    Tuesday, March 28, 2006 9:30 PM