Skip to main content

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.


Popular posts from this blog

Google NCR

Google NCRMost of you would be knowing about this trick in navigating to Google generic website. But I just came to know only a few days before and hence thought I would share the information with others too.
Whenever you type, Google automatically tries to redirect you to your country-specific website. For me, it always redirects to (Google India). But when we specifically want to navigate to Google Generic website for some reason, there are two ways to accomplish the same.Click the 'Go to' link at the bottom of the webpage that is displayed from prevent this redundant click, you can opt to type which would prevent the redirect from happening. The NCR stands for No Country Redirect. There is a brief discussion about this NCR over this forum.You may also like to check out Google help documentation regarding the country redirections from here.

Elegant 'MailTo' Replacement

Elegant 'MailTo' Replacement

MailTo tags have become a bane to all websites since spammers run spam robots which crawl the web to capture the email addresses, add to their catalogs and send spams to them. I just thought of sharing with others a simple JavaScript function which would trigger open the default email client instead of having mailto: embedded in the HTML Page.

Just have the following function included in your webpage

<script language='Javascript'>
function WriteMailTo(user,domain)
location.replace ('mailto:'+user+'@'+domain);

And whereever you want to invoke the mailto, just called WriteMailTo('user','') and the user's default email client should be launching (if configured) without any hassles.

Contacts import utility from Web2Project to Addressbook

I have been using Web2Project for planning my personal and professional tasks for a few years now. Now I have bifurcated the tools into the following:

Project PierAddress Book The only issue I had was to import my addressbook from Web2Project to AB. PP is a different animal. It does not serve as a comprehensive candidate for addressbook and hence I needed this bifurcation. 
I wrote up a following simple script to import the contacts to AB. The pre-requisite for this script is to hop on to PhpMyAdmin, export the contacts as a PHP array and then  modify the path in our import script to whatever you downloaded from PhpMyAdmin.
Our import script would explode the entries as SQL scripts into the browser window. Copy them and execute into PhpMyAdmin AB database to have the contacts imported.

Script URL: