When you say '.Net process task', do you mean the .Net code execute task?
You can achieve what you want:
1) Create a project in Visual Studio, add your code to a class, and compile in release mode.
2) Take the resulting dll (in the bin/release folder), and place it somewhere your VC server can access it
3) Load the dll in an Assembly execute task, and pick the class/method you want to excecute.
Note that if your code references other third party dlls, you have to be more careful about where you place you libraries, to make sure the runtime can find them