With MS coming up with ASP.Net vNext which has capability to run across platforms using Mono. But here are the steps you can perform on Ubuntu OS to run .Net code with existing framework
# If you're on Windows OS then the prerequisite is to install Oracle VirtualBox and Ubuntu .ISO image
# At Ubuntu terminal, download and install following packages via terminal:
- sudo apt-add-repository ppa:directhex/ppa
- sudo apt-get update
- sudo apt-get install monodevelop
# Incase you face any issue try running below command
- sudo apt-get -f install
# Now, install mcs utility which can compile your C# into exe file
- sudo apt-get install mcs
# ALL Set now!
# Create MonoTest.cs file e.g.,
- using System;
- namespace MonoTest
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("Hai to Mono");
- Console.Read();
- }
- }
- }
# Compile MonoTest.CS file
- mcs MonoTest.CS
# Run MonoTest.exe using mono
- mono MonoTest.exe
Ajay YadavPosted Nov 9, 2014, 8:34 AM
Good effort but I suggest u it could be more descriptive coz typical dot net developers couldn't achieve this feat easily due to not having technical competence in Linux
Guest UserPosted Jul 1, 2014, 7:59 AM
i say wait for vNext where we've better Mono support powered with Xamarian
Abhishek JaiswalPosted Jun 30, 2014, 11:57 PM
so, what we are going to use to write C# code in UBUNTU env ?
Guest UserPosted Jun 30, 2014, 10:21 AM
@Abhishek that's right. this is stop gap solution for existing framework, if someone want to port for Linux variants
Abhishek JaiswalPosted Jun 30, 2014, 9:01 AM
C#.NET going to be platform independent with vNEXT ?
Guest UserPosted Jun 30, 2014, 4:56 AM
Thanks Mahesh!!
Mahesh ChandPosted Jun 30, 2014, 1:43 AM
Very nice.