Skip to content

Instantly share code, notes, and snippets.

@smamran
Last active January 26, 2016 08:53
Show Gist options
  • Save smamran/db3450ada3deb9c4c931 to your computer and use it in GitHub Desktop.
Save smamran/db3450ada3deb9c4c931 to your computer and use it in GitHub Desktop.
VCC C++ C#

VC File Compile:

Run: Developer Command Prompt for VS2015

>> cd F:\GD\Microsoft\MSDN-CODES
>> F:
>> cl main.c

VC++ File Compile:

Run: Developer Command Prompt for VS2015

>> cd F:\GD\Microsoft\MSDN-CODES
>> F:
>> cl FileSystemWatch.cc /clr

Add library to CC File

>> #pragma comment (lib, "user32.lib")

C# File Compile:

C# Compile

Sample Command Lines for the C# Compiler

Compiles File.cs producing File.exe:

csc File.cs

Compiles File.cs producing File.dll:

csc /target:library File.cs

Compiles File.cs and creates My.exe:

csc /out:My.exe File.cs

Compiles all the C# files in the current directory, with optimizations on and defines the DEBUG symbol. The output is File2.exe:

csc /define:DEBUG /optimize /out:File2.exe *.cs

Compiles all the C# files in the current directory producing a debug version of File2.dll. No logo and no warnings are displayed:

csc /target:library /out:File2.dll /warn:0 /nologo /debug *.cs

Compiles all the C# files in the current directory to Something.xyz (a DLL):

csc /target:library /out:Something.xyz *.cs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment