Sunday, September 30, 2007

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.

  1. Ensure that the appropriate version of Microsoft .NET is in the System Path.
  2. From within the explorer, a few simple steps can get you 'Command Prompt' without taking pains of navigating through the nested folder structures:
    1. Navigate to Tools -> Folder Options in Windows Explorer
    2. Choose 'File Types' Tab
    3. Choose Folder from the list. Click 'Advanced'
    4. Choose New
    5. 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.
    6. 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:

  1. 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.

No comments:

[Imported from Blogdrive]Online Virus Scanners

Online Virus Scanners Virus Scanners are no longer difficult to install, tedious to configure. There are easy to use Online Virus Scanne...