Partager via


Part 4: Run the app

[ This article is for Windows 8.x and Windows Phone 8.x developers writing Windows Runtime apps. If you’re developing for Windows 10, see the latest documentation ]

In this step, run your app on your development computer in Windows Phone emulator.

Run your app

Now you’ve finished your first Windows Phone app! Next you’ll build and run the app.

Before you test the app, make sure that your computer has Internet access to be able to test the WebView control.

To run your app in the emulator

  1. Build the solution by selecting the BUILD | Build Solution menu command.

    If any errors occur, they’re listed in the Error List window. You can open the Error List window, if it’s not already open, by selecting the VIEW | Error List menu command. If there are errors, review the steps above, correct any errors, and then build the solution again.

  2. On the Standard toolbar, make sure the deployment target for the app is set to one of the values for the Windows Phone Emulator, for example, Emulator 8.1 WVGA 4 inch 512MB.

  3. Run the app by pressing F5 or by selecting the DEBUG | Start Debugging menu command.

    This opens the emulator window and launches the app. If this is the first time you’re starting the emulator, it takes several seconds for the emulator to start and launch your app.

  4. To test your running app, click the Go button and verify that the WebView control loads the specified web site.

  5. To test the app in landscape mode, press one of the rotation controls on the emulator toolbar.

    The emulator rotates to landscape mode. The controls resize themselves to fit the landscape screen format.

  6. To stop debugging, you can select the DEBUG | Stop Debugging menu command in Visual Studio.

    It’s better to leave the emulator running when you end a debugging session. The next time you run your app, the app starts more quickly because the emulator is already running.

Congratulations! You’ve now successfully completed your first Windows Phone app.

Summary

Congratulations! You’ve now successfully completed your first Windows Phone Store app! You learned how to run your app on your development computer in Windows Phone emulator.

Next steps