Search code examples
asp.netvisual-studio

Visual Studio Play or Build to compile


I recently had a problem with the Issue Tracker starter kit that seemed to be resolved by using the "build" option. Previously, I would typically use the "play" button to debug my app, then just stage the files when everything was working, assuming that the last time I hit the "play" button, it had fully compiled the app.

Anyhow, I'm wondering if there's a difference between the "play" button and the "build" menu option? if so, what are the differences?


Solution

  • The "build" button compiles your website while the "play" button builds and fires up a browser with the default page as an argument.

    The "play" button is designed to execute a assembly that is designated in your solution as a starting point. Since an ASP.NET website has no true "entry point" (like static void Main() in a console application) the "play" button simulates a similar action by opening the browser to your projects "start page".