使用相同的 Visual Studio 解决方案部署多个 WP7 应用程序?

发布于 2024-10-22 00:51:55 字数 242 浏览 3 评论 0原文

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

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

编辑:

试用 API 不是我们的选择。我们考虑过这一点,但决定不使用它。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

oО清风挽发oО 2024-10-29 00:51:55

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

例子:

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

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
灼疼热情 2024-10-29 00:51:55

我建议您考虑试用 API。对于您想要完成的任务来说,它是首选的 WP7 实现。但是,如果您需要实现两个共享资源的应用程序,我建议您将解决方案构建为多个项目。每个电话应用程序都应该是自己的项目。然后创建在两个“应用程序”之间共享元素的类项目。每个手机项目都会编译成一个单独的“应用程序”。

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".

忆依然 2024-10-29 00:51:55

如果您想从同一项目实现两个不同的 XAP 安装,那么您只需更改 Properties/WMAppManifest.xml 文件中的 Title 和 ProductID GUID 信息 - 尽管您可能还想更改其他内容 - 例如图标、启动画面和一些“关于”信息

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

桜花祭 2024-10-29 00:51:55

如果这两个应用程序是同一解决方案中的不同项目,您可以使用配置管理器控制将哪些应用程序部署到构建上。

如果您没有将多个相关项目放入同一个解决方案中,请考虑将其打包。我发现这是管理多个相关项目的好方法。

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.

祁梦 2024-10-29 00:51:55

您可以在“构建”菜单中选择部署整个解决方案或仅部署当前启动项目。如果它们不是同一个解决方案的一部分,那么,不,你不能这样做。但是您也许可以编写一个使用部署工具的命令行脚本?

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?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文