home / software / tips and tricks / How to compile C sharp files from Command line?

How to compile C sharp files from Command line?

Updated:  02/23/2003 08:02 AM
Author:  Shiju Mathews

Status:    Resolved.


1.  Add a path to the system to csc.exe

a. From the desktop, right-click My Computer and click properties.
b. In the System Properties window, click on the Advanced tab.
c. In the Advanced section, click the Environment Variables button.
d. Finally, in the Environment Variables window, highlight the path variable in the Systems Variable section and click edit. Add or modify the path lines with the paths you wish the computer to access. Each different directory is separated with a semicolon.


Add   'C:\WINDOWS\Microsoft.NET\Framework\v3.5' to access if you are using .net framework

Then open command promt and type 'csc /t:library [Full path of the File including extenssion]'

Example: csc /t:library C:\ShijuTest\SQLSERVER\SqlServerProject1\SqlServerProject1\StoredProcedures.cs
Tags: How to compile C sharp files from Command line?
Updated on: October 2024