Reputation: 50855
Some of my older projects which I've brought to Visual Studio 2012 only have the option to open in Page Inspector, rather than directly in an external web browser. For instance, here is what the context menu looks like when I right click it:
Projects that are newly created in Visual Studio 2012 add an option to View in Web Browser:
How can I get the same function with my older projects? I'd rather not have to recreate the project and bring over all of the code.
Upvotes: 1
Views: 681
Reputation: 28396
I don't know why it would appear on some but not all projects (sounds like VS isn't identifying the project type correctly), but you could make sure it's enabled in your settings.
However, I'm guessing that this is configured correctly since it works for some projects. By chance, are your older projects using an older version of MVC? IIRC, older versions of MVC had View In Browser blocked for the views because VS couldn't hook them up to the correct route (i.e. it didn't know that Views\Foo\Index.cshtml mapped to http://localhost:1234/Foo
). I'm not aware of a workaround for this other than upgrading the version of MVC.
Upvotes: 1