Click here to Skip to main content
Licence CPOL
First Posted 8 Feb 2010
Views 3,026
Bookmarked 1 time

Windows Phone Deployment Patterns - Part 0 of n

In this series of blog posts, I'll be walking through different solutions for deployment scenarios for Windows Phones.
A Technical Blog article. View original blog here.[^]

I come from a C++ (and now C#) background. In both languages, the index of the first item in a list is zero, so I like to stay consistent to that when working with other lists (including blog posts). In this series of blog posts, I'll be walking through different solutions for deployment scenarios for Windows Phones. This first solution is the "Hello World" of deployments. It will get your files copied to the programs folder and will create an icon in your start menu. I'll be ignoring all of the other considerations that one might give for a deployment such as including prerequisites, performing custom actions, or setting up the PNG icon for Windows Mobile 6.5.

Let's say that you've already written your Windows Phone program and want to get it packaged into a deployment. You first need to add a new deployment project to your solution. Right-click on the project and select "Add New"->"Project". In your new project dialog in the "Setup and Deployment" category and the "Smart Device CAB Project" project type, double-check to make sure you've selected the "Smart Device Cab Project" and not the "CAB Project." Type in a name for your project and click on "OK."

Once the project is created, you can begin adding your files to it. First let's add the project that contains your application code to the project. Right-click on your deployment project and select "Add"->"Project Output." In the dialog that appears, make sure the name of the project that contains your code is selected from the top drop-down. Select "Primary Output" and "Content Files" from the listbox and select "OK". Right-click on the deployment project again and select "View"->"File System." You will not be able to select where on the device's file system your program will be installed.

The File System's view contains two folders: "Application Folder" and "Programs Folder." Highlight and erase the "Programs Folder." We won't be using it for this walkthrough. When you select the "Application Folder", you'll see that your program and its resources are referenced. Right-click on the Primary Output item and select "Create Shortcut to Primary Output." A shortcut will be created with its name highlighted. Enter in a name for the shortcut. Now you need to ensure that the shortcut will show up in the user's start menu.

In the file system editor, right-click on "File System on Target Machine" and select "Add Special Folder"->"Start Menu Folder." Once the Smart Menu Folder is selected, go back to the "Primary Output" folder. Click-and-drag the shortcut you made in the earlier steps into this folder. Once you've done that if you right-click on the deployment project and select "Rebuild", it will produce a cab that you can use to share and install applications.

That is all that is required for a simple deployment. The next time I post on this topic, I'll go through a more complex deployment scenario.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Joel Ivory Johnson

Software Developer

United States United States

Member

Follow on Twitter Follow on Twitter
I attended Southern Polytechnic State University and earned a Bachelors of Science in Computer Science and later returned to earn a Masters of Science in Software Engineering.
 
For the past few years I've been providing solutions to clients using Microsoft technologies for web and Windows applications.
 
While most of my CodeProject.com articles are centered around Windows Phone it is only one of the areas in which I work and one of my interests. I also have interest in mobile development on Android and iPhone. Professionally I work with several Microsoft technologies including SQL Server technologies, Silverlight/WPF, ASP.Net and others. My recreational development interest are centered around Artificial Inteligence especially in the area of machine vision.
 


Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
-- There are no messages in this forum --
Permalink | Advertise | Privacy | Mobile
Web01 | 2.5.120210.1 | Last Updated 8 Feb 2010
Article Copyright 2010 by Joel Ivory Johnson
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid