-
Notifications
You must be signed in to change notification settings - Fork 331
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Program does not contain a static 'Main' method suitable for an entry point #2214
Comments
@Grauenwolf Can you please add some more details. What is the version of dotnet cli and VS on the machine? I am assuming you are able to reproduce the issue using a simple unit test project. |
@Grauenwolf Are you still facing this issue ? |
I just retested with a clean project and it is still happening. VS: 16.3.2
|
@Grauenwolf I am sorry, not able to reproduce the issue. |
Closing this issue for now. Please share more details so we can help diagnose this. |
I have the same issue. |
@MarkBrainfire Could you please give us more details? Which version is working and which version isn't? Do you have any repro you could share with us? Thanks |
I solved the problem by updating Microsoft.NET.Test.Sdk from 17.1.0 to 17.2.0 (or above) DETAILS: The error message "Program does not contain a static 'Main" method suitable for an entry point" goes away when the Microsoft.NET.Test.Sdk is updated to either 17.2.0 (or the preview 17.4.0). Updating xunit and xunit.runner.visualstudio doesn't have any impact on this problem. |
I started getting this issue suddenly in |
@MoaidHathot Do you have a repro please? |
I am facing the same issue with version 17.13.0 and downgrading to 17.12.0 solves it. Actual reason unknown. |
Description
When I upgrade to Microsoft.NET.Test.Sdk v16.3.0 and rebuild, I get the below error message:
Switching back to Microsoft.NET.Test.Sdk v16.2.0 clears the error.
This has been consistent for both .NET Core 2.1 and 3.0 test projects. It affects both MSTest and xUnit projects.
The text was updated successfully, but these errors were encountered: