使用相同的Visual Studio解决方案部署多个WP7应用程序? [英] Deploy more than one WP7 App with same Visual Studio Solution?

查看:174
本文介绍了使用相同的Visual Studio解决方案部署多个WP7应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使用相同的Visual Studio解决方案部署多个WP7应用程序?我需要改变以实现这一点?更改Xap文件名和程序集GUID和标题没有实现。事实上,VS用新的标题覆盖旧的,但没有部署单独的应用程序。



背景:我们有一个Lite和Pro应用程序,我想要能够部署两个



编辑:



试用API不是一个选项为了我们。我们已经考虑过,但决定不使用它。

解决方案

我已经创建了基于当前配置的预建事件名称。此事件取代了解决方案中的应用程序配置(WMAppManifest.xml,SplashScreenImage.jpg)。



示例:



<$ $(ConfigurationName)

如果$(ConfigurationName)==Litegoto:copyLite
如果$(ConfigurationName) ==PROgoto:copyPro

echo未知配置
goto:end

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

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

goto:end

:end


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.

解决方案

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

这篇关于使用相同的Visual Studio解决方案部署多个WP7应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆