Configure C# on PC2 enviroment

Configuring C# in Pc^2 enviroment

This tutorial will guide you to add C# in Pc^2 environment for programming competitions.
First, you have to add csc.exe in the environment variable. but before that we have to find exact location of this file.
browse to C:\Windows\Microsoft .net\<Your Version>\csc.exe .
now to add this into environment variable, do that follow these steps:

  1. Right click on My Computer & click Properties.
  2. For Windows Vista/7. Click Advance System Settings
  3. Click Environment Variables
  4. Scroll down on the second tab and double click on PATH
  5. add the above path in the end of the link with ‘;'(semi-colon) prefix

    For example, in my pc it looks like
    C:\oracle\product\10.2.0\db_1\bin;C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Matlab7\bin\win32;C:\jdk\bin;C:\Windows\Microsoft.NET\Framework\v4.0.30319

  6. Click ok.
Now we have csc.exe in our environment variables, we can continue to add the C# compiler into PC^2.
to do that, follow these steps
  1. Open PC^2 admin panel
  2. Click on Languages and click ADD
  3. Type the name C#
  4. in the compiler line add csc {:mainfile}
  5. leave other fields as it is.
You can compare your Edit Language dialog with the one shown below to see if everything you typed is correct.
Now add the Problem and whenever a c# solution is submitted, it is compiled and PC^2 will show you the output, and of course you can configure your settings as needed.

About Muhammad Umer

I love to work on emerging technologies, i am currently associated with Microsoft as Technology Consultant.

Posted on January 25, 2013, in Uncategorized. Bookmark the permalink. Leave a comment.

Leave a comment