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

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

问题描述

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

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

背景:我们有一个 Lite 和 Pro 应用程序,我希望能够将这两个版本都部署到手机上.

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

试用 API 不适合我们.我们已经考虑过,但决定不使用它.

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

推荐答案

我已经创建了基于当前配置名称的预构建事件.此事件替换解决方案中的应用配置(WMAppManifest.xml、SplashScreenImage.jpg).

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.

示例:

echo "$(ConfigurationName)"

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

echo "Unknown Configuration"
goto :end

:copyLite
echo "copy lite"
  copy "$(ProjectDir)ResourcesPreBuildEventLiteWMAppManifest.xml" "$(ProjectDir)Properties" /y
  copy "$(ProjectDir)SplashScreenImageLite.jpg" "$(ProjectDir)SplashScreenImage.jpg" /y
goto :end

:copyPro
echo "copy pro"
  copy "$(ProjectDir)ResourcesPreBuildEventProWMAppManifest.xml" "$(ProjectDir)Properties" /y
  copy "$(ProjectDir)SplashScreenImagePro.jpg" "$(ProjectDir)SplashScreenImage.jpg" /y

goto :end

:end

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

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