Visual Studio Help - The "RunCommand" property is not defined

Cole Connelly picture Cole Connelly · Aug 24, 2017 · Viewed 24.4k times · Source

I'm using Microsoft Visual Studio Community 2017. I have created a project with multiple classes to be compiled. The primary class I want the application to run first has public static void Main(string[] args) in it already. In the library, I've set properties to the following:

  • Target Framework: .NET standard 2.0
  • Output type: Console Application
  • Startup object: Main.Game

Still, the error persists with all the forums I have visited. If you have encountered this problem, please guide me through so I can compile my program. Thank you :)

Answer

Sibeesh Venu picture Sibeesh Venu · May 25, 2018

I was facing this issue in my Visual Studio 2017 15.7.2 version. The cause for this issue in my case was, unknowingly I had changed my Asp.Net Core 2.1 Web API project output type to Class Library. Changing it back to Windows Application fixed my issue. Just sharing the same for the users who does silly mistakes like me.

enter image description here