Develop apps by using Visual Studio
Microsoft Visual Studio is a collection of tools that you can use to create, code, debug, localize, package, and deploy apps that target Windows 8.1 or Windows 10 devices. In short, Visual Studio can help you do just about anything you need to do to develop an app.
If you haven't used Visual Studio before, take a quick look around before you start writing code. Visual Studio has a lot of parts, but you don't need to know all about them to get started. After describing the basic steps of setting up a new project, we'll take a look at the Code Editor and other Visual Studio features.
For more info about the development tools for Windows Phone Store apps that you'll get when you install Microsoft Visual Studio 2013 Update 2 or later, see Development tools for Windows Phone apps.
To build an app that targets Windows 10 devices, install the Windows 10 Technical Preview tools.
To build an app that targets Windows 8.1 devices, install Microsoft Visual Studio 2013, or Microsoft Visual Studio 2015 Preview. See Get the Tools.
To create a Windows 8 version of a Windows Store app, use Microsoft Visual Studio 2012.
To maintain a Windows 8 version of a Windows Store app app by using Visual Studio 2013, see Service the Windows 8 version of your app.
If you want to create or maintain a Windows Phone 8 version of your Windows Phone Store app, install the Windows Phone SDK 8.0. This SDK is an optional component of Visual Studio 2013.
To build an app that targets Windows 10 devices, we recommend that develop your app by using Windows 10 Technical Preview. While other configurations might work, they aren't officially supported in this release of the Visual Studio Tools for Windows 10 Technical Preview.
If you're planning to build an app for Windows 8.1 devices, you have to develop your app on a computer running Windows 8.1. You can't use Windows 7, and developer licenses aren't available for Windows Server 2012, so you can't develop your app on that operating system either.
To create a Windows Phone Store app, be sure to install Visual Studio 2013 Update 2 or later.
First, get a developer license. You'll need one to develop and test a Windows Store app before the Store can certify it.
When you run Visual Studio for the first time, it prompts you to obtain a developer license. Read the license terms and then click I Accept if you agree. In the User Account Control (UAC) dialog box, click Yes if you want to continue.
It’s important to test your Windows Phone Store app on a real phone. Before you can deploy apps to your Windows Phone, you have to register the phone for development. After you register your phone, you can install, run, and debug apps on the phone.
For more info, see Register your Windows Phone device for development.
Each group contains a list of templates. Some important templates, like Blank App, Grid App, and Split App, are shared between all four programming languages. A few templates are language-specific. To learn more about them, see Templates to speed up your app development.
When you create a project, Visual Studio creates a solution, which is a way of managing the various source elements of your project (code files, images, style sheets, settings, and so on). A solution container can contain multiple projects, and a project container typically contains multiple items that represent the references, folders, and files that you need to create your app.
In addition to source code files, each project also has an package.appxmanifest file, which describes the app package for Windows as well as several image files, like splashscreen.png for the splash screen image and storelogo.png, which is used for the Store. You'll also find a project source certificate (.pfx) file that's required for signing the package is also included in each project.
When you plan your user interface, it's important to select the most appropriate Visual Studio project template for a starting point. You can develop your UI by writing code or by using a visual designer. A visual designer provides a designer-oriented interface for app design that includes a drag-and-drop interface for building the UI.
You can also use the visual designer provided in Blend for Visual Studio. You can open a Visual Studio project in Blend for Visual Studio by right-clicking the project in Solution Explorer and clicking Open in Blend. Alternatively, open the solution file (.sln) from within Blend for Visual Studio.
You can use a designer in Visual Studio to edit the app manifest file that describes your app package. The Manifest Designer has five tabs:
- Application. Configure settings such as start page and the initial orientation.
- Visual Assets. Specify the logos that appear for your app.
- Capabilities. Specify system features or devices that your app can use, such as Internet access, current location, and Music access.
- Declarations. Add declarations for app contracts, like search and share target contracts, and specify their properties.
- Packaging. Set properties that identify and describe your package when it is deployed.
For more info about the app manifest settings, see Configure an app package by using the manifest designer.
To open the Manifest Designer, double-click the package.appxmanifest file in Solution Explorer, or right-click the file and click View Designer.
- IntelliSense, which provides features such as statement completion and parameter Help as you type code. This illustration shows a member list in the C# Code Editor. Note that the list also displays a Quick Info box for the selected item.
- Code snippet insertion, available by right-clicking in a code file and clicking Insert Snippet.
- Navigation aids like Go To Definition, Bookmarks, and Navigate To.
The Go To Definition command enables you to find the definition of a class or function by right-clicking the identifier and clicking Go To Definition. (Visual Basic and Visual C++ use the Object Browser to display information about Windows Runtime types.)
To set and use Bookmarks, click Edit > Bookmarks , or use the shortcut keys shown on the Bookmarks submenu.
Open the Navigate To window by pressing Ctrl+Comma with the Code Editor open, or by clicking Edit > Navigate To. Navigate To can find symbol definitions and file names in the solution, but not local variables.
- Outlining, word wrap, displayed line numbers, and other features.
You can customize the behavior of the Code Editors, and enable or disable features like indentation, word wrap, and statement completion. To customize the behavior of the Code Editors, click Tools > Options, expand Text Editor, expand the appropriate Code Editor to configure, and then select the appropriate category of options.
To build an app, click Build Solution (or press F7) or Rebuild Solution (or press Ctrl+Alt+F7) on the Build menu. You'll see the results of the build process in the Output window.
To run your new app in debug mode, click Debug > Start Debugging, or press F5. By default, this runs the app in the host computer (for Windows Store apps), and a Windows Phone emulator (for Windows Phone Store apps). You can choose to run a Windows Store apps by using the simulator or a remote device. You can choose to run a Windows Phone Store apps on other emulators or a Windows Phone that is connected to your computer. For more information, see Running Windows Store apps from Visual Studio.
Configure the deployment package of your app by using a designer. Just double-click the package.appxmanifest file in Solution Explorer and the Manifest Designer will appear. In the designer, select the Packaging tab. For more info, see Configure an app package by using the manifest designer.
To create your first app, see Your first app.
To learn more about developing an app by using the Visual Studio templates, see these topics:
- C#, VB, and C++ project templates
- C#, VB, and C++ item templates
- Retarget your Windows 8 app to Windows 8.1.
- Product Support and Accessibility
- Accessibility in Store apps (VB/C#/C++ and XAML)