Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. compileing C# program using vs2012 command prompt

compileing C# program using vs2012 command prompt

Scheduled Pinned Locked Moved C#
csharphelpquestionvisual-studiotutorial
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sandhya Bandar
    wrote on last edited by
    #1

    how to compile a C# program using vs2012 command prompt ? i wanted to compile my program(Prog name:Demo.cs) which is in this folder(C:\Pra) when i am trying to compiling my prog like this C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC>C:\Pra>csc Demo.cs i am getting an error i.e Acess is denied HOW CAN I SOLVE THIS,Please help me. Thank you

    Sandhya

    OriginalGriffO 1 Reply Last reply
    0
    • S Sandhya Bandar

      how to compile a C# program using vs2012 command prompt ? i wanted to compile my program(Prog name:Demo.cs) which is in this folder(C:\Pra) when i am trying to compiling my prog like this C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC>C:\Pra>csc Demo.cs i am getting an error i.e Acess is denied HOW CAN I SOLVE THIS,Please help me. Thank you

      Sandhya

      OriginalGriffO Offline
      OriginalGriffO Offline
      OriginalGriff
      wrote on last edited by
      #2

      Change directory to the target folder "C:\Pra" and run the command from there: you will either need to specify the path to CSC.EXE or use the VS command prompt tool which sets all the required paths as part of it's environment variables. Trying to run CSC from it's application folder will not work as you do not have write access to anything under Program Files by default, so when it tries to create output file,s you will get "access denied" errors.

      Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952) Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)

      "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
      "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups