Results 1 to 2 of 2

Thread: Running C#.NET from MS DOS command line

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2005
    Posts
    283

    Running C#.NET from MS DOS command line

    I was trying to run a program (HelloWorld) in C#.NET from DOS command line by using the following command:
    csc hello.cs
    However it is not working. I am getting the following message:
    'cpc' is not recognized as an internal or external command,
    operable program or batch file.
    what am I doing wrong?

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: Running C#.NET from MS DOS command line

    You have to use the Visual Studio command prompt, as opposed to the regular Windows command prompt, to set up the appropriate environment variables. Note that there is no DOS any more.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width