I'm currently working on a .net core 5.0 console app I have lately reinstalled my visual studio app when changing computer, my working project is now facing some issues. The testprojects don't have any main method anymore. this is the error being returned by Visual Studio
Severity Code Description Project File Line Suppression State Details
Error CS5001 Program does not contain a static 'Main' method suitable for an entry point database-serviceTests C:\...\myProject\database-serviceTests\CSC 1 Active
I've seen online that those methods are being auto generated by the app, but I find nowhere where to regenerate them. Is there another way than recreating new test projects and moving all the contents inside? thank you
I have tried to clean, build, rebuild, changed the "Microsoft.NET.Test.Sdk" Version (using 17.4.0 right now). Only changing .Net.Test.sdk version has been a working workaround for this, but this will not pass for later reviews. Thanks
Reference from Elie De Tavernier:
The solution can be found by switching package versions, cleaning and rebuilding the application using VS tools:
Microsoft.Net.Test.SDK changed from 17.4.0 to 16.7.1
MSTest.TestAdapter changed from 3.0.0 to 2.1.1
MSTest.TestFramework from 3.0.0 to 2.1.1