The problem is that after I added the new class, the error came up when I did build the solution. What can be wrong?
In Form1, I don’t have any code yet.
I jus
I experienced this issue after adding an xUnit test class to my .NET Core 2.1 project.
The following article gives a detailed explanation of why, and provided the answer that worked for me - here.
Basically, the compiler automatically generates a Main for the new class. You can provide a directive in your .csproj file to keep this from happening:
Add this to your section and recompile.