2
votes

It could be that I'm overlooking the obvious, but how do I launch an ASP.NET MVC 4 application, being developed in Visual Studio 2012, in the Windows Phone 8 emulator? I've installed the WP8 SDK, and am able to debug Windows Phone apps in the WP8 emulator from Visual Studio, but there is no such option to launch the emulator from an MVC project. I am also unable to start the emulator directly, as it doesn't show up when I search for 'emulator' in the Windows 8 Metro screen.

1
An ASP.NET application is just a website. So open internet explorer in the emulator, then navigate to the server your website is hosted on. If you're using the development server rather than IIS, you may also want to have a look at this question: stackoverflow.com/questions/13185671/…Kevin Gosse
@KooKiz The problem is, as I state in my question, that I can't locate the emulator. I've searched for it among installed apps, and I can only find Azure emulators.aknuds1
So basically, you just want to know how to launch the Windows Phone emulator without having a Windows Phone project. Sorry, the question title was misleading.Kevin Gosse
@KooKiz It depends, if there's a way to launch an ASP.NET MVC app directly in the emulator, that'd be preferable. That'd have the added benefit of circumventing the problem of not being able to launch the emulator directly.aknuds1

1 Answers

1
votes

My guess at this point is that there's no way of launching a Web application in the WP8 emulator directly from Visual Studio 2012. The jury's still out on how to start the emulator application from Windows 8 (i.e. not via Visual Studio) though :(

The only way I'm currently able to start the WP8 emulator is to launch a WP8 app in it from Visual Studio 2012.

The workaround I've found is to debug a WP8 app in the emulator via Visual Studio, stop debugging while not closing the emulator, open the Web app project in Visual studio, start it and navigate to it in the WP8 emulator.

Note that you must provide your computer's IP address to the browser, as the emulated WP8 is running as a separate host on the network. As such, you must also configure IIS Express to allow access via said IP address and also configure the firewall to let HTTP traffic on the port in question through.