1. Csc.exe is. NET used to compile the. cs file. Generally in C:\Windows\Microsoft.NET\Framework\v2.0.50727
2, first confirm whether to configure the environment variables (of course, if you do not configure the line, but to add a path), if not, follow these steps to configure (WINDOW7)
Right-click on "Computer"--"properties"--"Advanced system Settings"--"Environment variables"-"System variables" to find the variable path
Add paths to Path: c:/windows/microsoft.net/framework/v2.0.50727/.
3. Start-run-type cmd,window7 The default is C:\Users\zuo (username) >.
4, Input: cd\. That is, the C-drive directory. (Of course the next step input D: on the D-plate)
5. Enter: csc-? or csc-help to view the command options. (However, there is no egg, because a lot of it is not used and can not understand)
6. Copy the CS file you want to compile to the C packing directory
7, in DOS input: Csc/t:library class_name.cs (Note: class_name is the name of the class that you want to compile).
8, after the success you will see you just copied to the C drive after the class will follow a DLL (done).
Problems encountered:
1. The namespace "system" does not exist ...
WORKAROUND: Delete the other namespaces in the class, leaving only the using System;
Compiling a CS file to build a DLL file to compile the class into an assembly