David Ruttka

I make computers do things

How to Run Your ASP.NET Web Application When You Start Debugging Instead of Launching the Page / View You're Editing

I sent Michael on a wild goose chase because I wasn’t paying attention to a project setting. A project setting that I’ve used multiple times, including this week. An incredibly simple project setting that will change your life.

Web project settings

Project Properties > Web > Start Action. Above, I chose Specific Page but left it blank so that it navigates to the root and starts the app. Current Page is the default, which I recall all too painfully from F5-ing ASP.NET MVC views a couple of years ago. There’s also a “Don’t open a page” option down there at the bottom, which is my new favorite setting when working on Web API projects. Will and I used this option earlier this week, and there was much rejoicing.

On a side note, if you’re working on single page apps and want the magic of Scripts.Render without pulling in the entirety of MVC, check out Michael’s Bundler. I’m using it, and it is super groovy. He’s got a couple of blog posts introducing it here and here.

Just remember that if you consume it, his code will not work at all unless you actually execute it.

This post originally appeared on The DevStop.