- Back to Home »
- Essence of Commandline Compilation
Essence of Commandline Compilation
Whatever be the fancy IDE windows, the power and essence of commandline compilation is never hidden. Even the IDE actually uses the same compiler switches as the first line of the 'Output' window reveals. Here I am just trying to share a few tips and tricks to streamline an easy way to achieve commandline compilation. I am not using Visual Studio .NET command prompt and just SDK tools and hence this should work for users who do not have Visual Studio .NET also.
- Ensure that the appropriate version of Microsoft .NET is in the System Path.
- From within the explorer, a few simple steps can get you 'Command Prompt' without taking pains of navigating through the nested folder structures:
- Navigate to Tools -> Folder Options in Windows Explorer
- Choose 'File Types' Tab
- Choose Folder from the list. Click 'Advanced'
- Choose New
- Give a easy to understand name like 'Launch DOS Prompt' and the application as CMD /K CD "%1". The K switch is used to instruct the CMD.exe to carry out the command following it (CD "%1" in our case) and to remain without closing the window. You can check out the documentation on CMD.exe switches over here.
- Click OK for all the dialogs to save the settings.
Now, you can launch csc.exe compiler to compile your .Csharp Files. This also further facilitates the following. Quick generation of Strong Names, Signing it off etc.
Related Topics of Interest:
- If you have Visual Studio 2005 onwards, you can automatically get the path from 'Copy Full Path' option of any file that is opened as a tab in the IDE.