Deploy more than one WP7 App with same Visual Stud

2019-02-14 06:01发布

How can I deploy more than one WP7 app with the same Visual Studio solution? What do I need to change to achieve this? Changing Xap file name and assembly GUID and title does not achieve it. In fact VS overrides the old one with new title but does not deploy a separate app

Background: We have a Lite and Pro app and I want to be able to deploy both versions onto the phone.

EDIT:

Trial API is not an option for us. We have thought about that but decided to not use it.

5条回答
Luminary・发光体
2楼-- · 2019-02-14 06:16

If the two apps are different projects within the same solution you can control which ones get deployed on a build using the configuration manager.

If you 're not puting multiple related projects int eh same solution, consider tyring it. I find this a great way of managing multiple related projects.

查看更多
贪生不怕死
3楼-- · 2019-02-14 06:17

I would recommend you consider the Trial API. It's the preferred WP7 implementation for what you are trying to accomplish. But if you have a need to achieve two apps that share resources, I would recommend you structure your solution into multiple projects. Each phone application should be its own project. Then create class projects that share elements among both "applications". Each phone project will compile into a separate "application".

查看更多
走好不送
4楼-- · 2019-02-14 06:21

You can choose to deploy the entire solution or just the current startup project in the Build menu. If they are not both part of the same solution, then, no, you can't do that. But you could write a command line script that uses the deployment tool, perhaps?

查看更多
等我变得足够好
5楼-- · 2019-02-14 06:34

If you want to achieve two different XAP installations from the same project, then you only need to change the Title and ProductID GUID information inside the Properties/WMAppManifest.xml file - although you will probably also want to change other things too - e.g. the icons, the splashscreen and some "about" information

查看更多
Fickle 薄情
6楼-- · 2019-02-14 06:36

I have created prebuild events, which is based on the current configuration name. This event replaces the app configuration (WMAppManifest.xml, SplashScreenImage.jpg) in the solution.

Example:

echo "$(ConfigurationName)"

if "$(ConfigurationName)" == "Lite" goto :copyLite
if "$(ConfigurationName)" == "PRO" goto :copyPro

echo "Unknown Configuration"
goto :end

:copyLite
echo "copy lite"
  copy "$(ProjectDir)Resources\PreBuildEvent\Lite\WMAppManifest.xml" "$(ProjectDir)\Properties\" /y
  copy "$(ProjectDir)SplashScreenImageLite.jpg" "$(ProjectDir)SplashScreenImage.jpg" /y
goto :end

:copyPro
echo "copy pro"
  copy "$(ProjectDir)Resources\PreBuildEvent\Pro\WMAppManifest.xml" "$(ProjectDir)\Properties\" /y
  copy "$(ProjectDir)SplashScreenImagePro.jpg" "$(ProjectDir)SplashScreenImage.jpg" /y

goto :end

:end
查看更多
登录 后发表回答