Answer the question
In order to leave comments, you need to log in
How to fix error CS1555?
I can't fix error CS1555, what should I do?
public class Program
{
DiscordSocketClient client;
public static void Main(string[] args)
=> new Program().MainAsync();
Answer the question
In order to leave comments, you need to log in
You have a crooked csproj:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp5.0</TargetFramework>
<StartupObject>Program</StartupObject>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Discord.Net" Version="3.1.0" />
<PackageReference Include="Discord.Net.WebSocket" Version="3.1.0" />
</ItemGroup>
</Project>
the Main function should not call itself. This is complete nonsense. Write like this and you will be happy.
public class Program
{
public static void Main(string[] args)
{
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question