[C#] c# | windows cmd 컴파일(compile)
컴파일러(compiler) 기본 위치
- 32bit : C:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe
- 64bit : C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe
1. 메모장(편집기) 코드 작성
- 파일명 : cmdCompileTest.cs
using System;
namespace cmdCompileTest
{
class cmdCompileTest
{
static void Main(string[] args)
{
Console.WriteLine("Hello World\ncmdCompileTest\n");
}
}
}
2. cmd창에서 컴파일
- C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe cmdCompileTest.cs
- 위 명령은 컴파일 후 실행파일을 컴파일 명령을 실행하는 폴더에 생성된다(즉 현재 위치)
3. 컴파일 후
- cmdCompileTest.exe 생성
4. 실행
2022.02.02 신규 작성
댓글