Tip on how to manually deploy a .xap to the emulator
-
Tuesday, April 13, 2010 10:11 PM
We are submitting builds of our WP7 XNA project to our publisher and needed a way to deliver the build without sending them the entire source tree and have them build it in VS2010 just to get it in the emulator. I hadn't seen any discussion about it in here or other forums/blogs, so with Process Explorer I had a peek at what VS2010 does.
"%XNAGSv4%\Tools\wp.exe" install "file.xap" "app Id" "GameThumbnail.png" "XapCacheFile.xml" /clean
wp.exe is the command-line Windows Phone management tool. You can see many other features by running it without any parameters.
file.xap is created by VS2010 and is found in the output directory.
app Id is the Guid found in Properties\AssemblyInfo.cs.
GameThumbnail.png is found in the output directory.
XapCacheFile.xml is found in the intermediate directory.
It will deploy to the default device (usually the emulator unless you have hardware). You can deploy to a different device using the /device:<id> option where id is found by running "wp.exe devices".
I thought this might help someone who also needed a way to manually deploy a .xap to the emulator.
- Edited by Steve 'Sly' Williams Tuesday, April 13, 2010 10:12 PM Clarification of project type
Answers
-
Wednesday, April 14, 2010 11:39 PM
Testing with a small Silverlight app, it seems that VS2010 starts the emulator directly and then uses inter-process communication to deploy the app. I get the same error as above when trying to deploy a Silverlight app using the wp.exe tool.
So it seems this tip is useful for XNA apps only.
- Marked As Answer by Steve 'Sly' Williams Wednesday, April 14, 2010 11:40 PM
-
Tuesday, May 18, 2010 7:31 AM
When you say it's a Windows Phone application, do you mean Silverlight? I am guessing it is a Silverlight app because it has ApplicationIcon.png (the default icon name for Silverlight apps) instead of GameThumbnail.png (the default icon name for XNA apps). In this case, wp.exe can not be used to deploy your app to the emulator. Why you are getting the error "Too many arguments" I do not know. When trying to deploy a Silverlight app (called Windows Phone Application in Visual Studio 2010), you should see the following:
C:\Users\Sly\Documents\Visual Studio 2010\Projects\WindowsPhoneApplication1\WindowsPhoneApplication1>"%XNAGSv4%\Tools\wp.exe" install bin\debug\WindowsPhoneApplication1.xap 71f6d153-0759-4d6e-9bcd-de9a49d8f232 bin\debug\ApplicationIcon.png obj\debug\XapCacheFile.xml
error: The specified package can not be opened or contains an invalid manifest or signature.- Marked As Answer by Steve 'Sly' Williams Tuesday, May 18, 2010 7:32 AM
-
Tuesday, May 18, 2010 3:05 PM
The cause of your error is that your paths have spaces in them (D:\MobileApps\ShopEdge\Coding\Windows Mobile 7 \ShopEdge_WinMo), but you have not wrapped the paths in quotes.
The only way I know to deploy a Silverlight app to the emulator is to deploy it through Visual Studio.
- Proposed As Answer by Santhosh Kumar Avva Wednesday, May 19, 2010 10:03 AM
- Marked As Answer by Steve 'Sly' Williams Wednesday, May 19, 2010 4:09 PM
All Replies
-
Tuesday, April 13, 2010 11:26 PMThanks for posting this information! Some one has been asking me about this.Joel Ivory Johnson | http://www.j2i.net | Device Application Development MVPIt takes all the running you can do to stay in one place.If you want to get somewhere else,you must try to run at least twice as fast as that.
-
Wednesday, April 14, 2010 1:16 AM
Thanks! this is very useful.
-
Wednesday, April 14, 2010 5:46 AMThanks! this might be useful in the future
-
Wednesday, April 14, 2010 1:42 PM
-
Wednesday, April 14, 2010 6:56 PMI got error message:"C:\Program Files\Microsoft XNA\XNA Game Studio\v4.0\Tools\wp.exe" install "MySLApp.xap" "MySLApp's Id" "ApplicationIcon.png" "..\..\obj\Debug\XapCacheFile.xml" /cleanThe specified package can not be opened or contains an invalid manifest or signature.
-
Wednesday, April 14, 2010 9:05 PM
I have ended up with the same issue as JamesMo.. i think the issue may be that we're trying to run a Silverlight XAP - perhaps this method only works for WP7 apps built with XNA?
-
Wednesday, April 14, 2010 11:18 PM
I've only tested with XNA apps. Since the wp.exe tool is in the XNA distribution, I'm guessing it may well be for XNA apps only. I'll have a hunt around for what happens with a Silverlight app.
-
Wednesday, April 14, 2010 11:39 PM
Testing with a small Silverlight app, it seems that VS2010 starts the emulator directly and then uses inter-process communication to deploy the app. I get the same error as above when trying to deploy a Silverlight app using the wp.exe tool.
So it seems this tip is useful for XNA apps only.
- Marked As Answer by Steve 'Sly' Williams Wednesday, April 14, 2010 11:40 PM
-
Monday, May 17, 2010 1:26 PM
Hello.
I have some issues with your tips.
Indeed, it only launch the emulator, but doesn't load my xap file (I then only have the basic homepage of the emulator).
Here are the lines I wrote :
"C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\Tools\wp.exe" install "path...\xapDeploymentTest.xap" "my guid" "path...\thumbnailName.PNG"
"path...\XapCacheFile.xml" /clean
Any idea?
Thanks.
-
Monday, May 17, 2010 2:32 PM
With the April Refresh, XNA apps now get added to the Games Hub by default, which is not visible in the emulator. You can change this back to the apps list by editing Properties/WindowsPhoneManifest.xml and changing the app type from "App.Games" to "NormalApp". There is more information in the CTP release notes.
There is another option in wp.exe to launch an app that you could also use. Just type wp.exe (along with the path if required) to see the other options.
-
Tuesday, May 18, 2010 5:10 AM
Hello:
I have issues with your tips.
Indeed, it only launch the emulator, but doesn't load my xap file
1)
C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\Tools>
wp.exe install path...Bin\Debug\MyAppName.xap "APPID"
With this cmd it is opened emulator and error message "Invalid Application ID" (I got app ID from Properties/AssemblyInfo.cs)
2)
C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\Tools>
wp.exe install path...Bin\Debug\MyAppName.xap "APPID" "path...\ApplicationIcon.png"
With this cmd is said that "Too many arguments"
And, what is XML file which is the last param in ur tip? (I found only system.xml in my output directory)
Thanks in advance.
- Edited by Santhosh Kumar Avva Tuesday, May 18, 2010 5:12 AM Modified error message
-
Tuesday, May 18, 2010 5:30 AM
Firstly, it works with XNA apps only. It does not support Silverlight apps. You do not mention which type of app you are trying to deploy.
The XapCacheFile.xml is found in the intermediate directory (obj), not the output directory (bin).
All the parameters are required. Here is the help printed by wp.exe for the install command.
C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\Tools>wp help install wp install [options] <xap> <app> <icon> <xapcache> Installs an application on a device. Arguments: xap Path to the package to be installed. app ID of the product to be installed. icon Path to the application's icon. xapcache Path to the xap cache xml file for incremental deployment. Options: /clean Forces a non incremental, clean deployment. /device:<value> Sets the target device. Omit to use the default device. /instance:<value> Sets the application instance ID. If omitted, the applicati on ID is used as the instance ID. /genre:<value> Sets the application genre. Default value is "Apps.Games".
-
Tuesday, May 18, 2010 6:41 AM
Hi,
My application is windows Phone application. Is this the way to install app. If not please help me...
C:\Program Files (x86)\Microsoft XNA\XNA Game Studio\v4.0\Tools>
wp.exe install "path...\Bin\Debug\MyApp.xap" "AppID" "path...\Bin\Debug\ApplicationIcon.png" "path...\obj\Debug\XapCacheFile.xml"
Iam geting the following error...
Too many arguments
- Edited by Santhosh Kumar Avva Tuesday, May 18, 2010 6:42 AM Spell Error
-
Tuesday, May 18, 2010 7:31 AM
When you say it's a Windows Phone application, do you mean Silverlight? I am guessing it is a Silverlight app because it has ApplicationIcon.png (the default icon name for Silverlight apps) instead of GameThumbnail.png (the default icon name for XNA apps). In this case, wp.exe can not be used to deploy your app to the emulator. Why you are getting the error "Too many arguments" I do not know. When trying to deploy a Silverlight app (called Windows Phone Application in Visual Studio 2010), you should see the following:
C:\Users\Sly\Documents\Visual Studio 2010\Projects\WindowsPhoneApplication1\WindowsPhoneApplication1>"%XNAGSv4%\Tools\wp.exe" install bin\debug\WindowsPhoneApplication1.xap 71f6d153-0759-4d6e-9bcd-de9a49d8f232 bin\debug\ApplicationIcon.png obj\debug\XapCacheFile.xml
error: The specified package can not be opened or contains an invalid manifest or signature.- Marked As Answer by Steve 'Sly' Williams Tuesday, May 18, 2010 7:32 AM
-
Tuesday, May 18, 2010 7:49 AM
Yes, My app is windows Phone application (Sliverlight application).
Please see the
screenshot of my error message. (http://maq2.web.officelive.com/Documents/Error.jpg)How to deploy windows phone application in emulator?
Thanks in advance
-
Tuesday, May 18, 2010 3:05 PM
The cause of your error is that your paths have spaces in them (D:\MobileApps\ShopEdge\Coding\Windows Mobile 7 \ShopEdge_WinMo), but you have not wrapped the paths in quotes.
The only way I know to deploy a Silverlight app to the emulator is to deploy it through Visual Studio.
- Proposed As Answer by Santhosh Kumar Avva Wednesday, May 19, 2010 10:03 AM
- Marked As Answer by Steve 'Sly' Williams Wednesday, May 19, 2010 4:09 PM
-
Wednesday, May 19, 2010 10:04 AM
Hello,
Thank you Steve...Thanks for ur replies.
If there is anyway to deploy windows mobile Silverlight application please post here...
-
Thursday, July 29, 2010 3:45 AM
HI all,
Is there any way to deploy the xap file on to the device without using visual studio?
Thanks.
-
Thursday, July 29, 2010 3:48 AM
Hi Santhosh,
I haven't read everything here.. but just thought I'd check .. have you tried How to: Use the XAP Deployment Tool for Windows Phone
- Proposed As Answer by Santhosh Kumar Avva Thursday, July 29, 2010 5:04 AM
-
Thursday, July 29, 2010 5:04 AM
Thank u Trees.
I have tried and succeeded... Now, i am able to deploy my app on the device...
-
Thursday, July 29, 2010 5:12 AM
No worries.
- Edited by Mick N Thursday, July 29, 2010 7:40 AM contact sorted
-
Thursday, July 29, 2010 5:49 AM
Thanx for sharing good info!
But I have no device to perform yet... :(
- Yeongki
-
Thursday, July 29, 2010 6:26 AMThe wp tool (and my original tip) has been put to bed, and the Xap Deployment Tool (as Trees posted) is the supported method for deploying any .xap to a device or the emulator.

