Click here to Skip to main content
15,917,568 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Recently converted to linux and for c# i started to use mono,(previously used visual studio). The problem is when i press control and f5 my program does not launch. Sometimes the screen comes up with my programs name on top but the program does not work.
This is the same for simplistic codes, even the default one.
class Program
    {
        public static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");
        }
    }

no errors no warnings no nothing

What I have tried:

class Program
    {
        public static void Main(string[] args)
        {
            Console.WriteLine("Hello World!");
        }
    }
Posted
Updated 29-Jun-19 1:24am

1 solution

It's quite possible that it's too quick: run that app and the window may have no time to actually get painted before the app is closed down and all resources released.

Add
C#
Console.ReadLine();
At the end of the Main method and see what happens then.
 
Share this answer
 
Comments
Member 14515972 29-Jun-19 7:50am    
No effect. Another thing to note is that when i run a program the "application output (program name)" doesnot show up. It only shows up when i run it again and the error "Debugger operation failed" also shows up.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900