【问题标题】:How do I know the project is targeted for Windows Phone Emulator when it is being built?我如何知道项目在构建时是针对 Windows Phone Emulator 的?
【发布时间】:2013-05-16 01:24:04
【问题描述】:

在我的 SDK 7.1 的 Windows Phone 项目中,我想有条件地包含一个文件:

<Content Include="MyFile.jpg" Condition="'$(Configuration)' == 'Debug'" />

一切都很好,但条件并不完美。我希望仅在为 Windows Phone 模拟器构建项目时才包含该文件。在 Visual Studio 中通过下拉菜单选择目标:

我查看了this MSDN document,找不到合适的变量来填充目标名称。

我使用哪个构建变量来检测项目是针对 Windows Phone 模拟器的?

【问题讨论】:

    标签: visual-studio-2010 windows-phone-7 build


    【解决方案1】:

    我认为对于模拟器this property 将等于“Emulator”或类似的东西(您可以通过在模拟器上启动应用程序并使用该值来检查其确切值)。

    【讨论】:

    • 此属性在运行时可用,而不是在编译时可用
    猜你喜欢
    • 2014-09-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-09-07
    • 1970-01-01
    • 2010-09-28
    • 1970-01-01
    相关资源
    最近更新 更多