Update your path in life!

Posted by KansasCoder / Category: ,

If you plan on using the dos prompt to compile your C# and haven't already done so you will want to add the path to csc.exe to your environment variables. It will allow you to open a dos prompt window and type "csc yourCsFilename.cs" and go without having to navigate each time to the location of csc. A healthy, carpal tunnel free programming life is built on saving key strokes so find and use your shortcuts!! Move your mouse as far away from you as possible and just start looking up and using the shortcuts that appear on your menus! It will greatly increase your efficiency over time.



To do this on Windows 7 and Framework 3.5 right click 'My Computer' and click on 'Properties' then click on 'Advanced System Settings' over on the left. Click on the 'Advanced Tab' and then the button at the bottom that reads 'Environment Variables'. Put your cursor in the second box (System variables) and scroll down until you find the one named 'Path'.

Click 'Edit' then remove your hand from the mouse ( if you are not already using the tab key)!


Hit your 'End' key and paste this whole string in there ;C:\Windows\Microsoft.NET\Framework\v3.5\ using 'ctrl - V'...of course.


'OK' your way out of all the windows, open a dos prompt (using the keyboard and type csc /help ( that's 'csc' a space and then '/help')


you should get a bunch of help scrolling past you in the dos window. If you don't open Windows Explorer and paste the path to csc.exe into it 'C:\Windows\Microsoft.NET\Framework\v3.5\' and if you don't get there then you need to install framework 3.5. Search your Framework directory for 'csc'exe and paste that into the Path environment variable instead.

Live long and prosper!

0 comments: