C# error in replit's IDE

I get this when I run a c# program: CSC : error CS1555: Could not find ‘Program’ specified for Main method [/home/runner/2/sdfsdf.csproj]

The build failed. Fix the build errors and run again.

Hi there @schoolcs! Please could you send the URL of a Repl in which you’re experiencing this problem so we can take a look. :slightly_smiling_face:

Actually, I believe i have managed to find your repl: https://replit.com/@schoolcs/1
The problem is, dotnet is looking for a Program class with a Main function, but you have only provided a class called MainClass. All you need to do to fix your error is rename this class to Program! :+1:

1 Like