【问题标题】:C# Visual Studio TargetPlatform macroC# Visual Studio TargetPlatform 宏
【发布时间】:2020-11-20 09:33:34
【问题描述】:

我们有一些 x64 或 x86 的第三方 c++ dll。现在我们要编写一个构建后脚本,如果目标平台是 x86 或其他方式,它将 x86 dll 复制到目标目录中。我们的脚本如下所示:

xcopy "$(TargetDir)Lib\$(PlatformName)\*.*" "$(TargetDir)" /e /y /i

$(PlatformName)总是AnyCpu。 我们还找到了$(PlatformShortName),但它始终是空的。

有人知道正确的宏吗?或者更好的正确方法?

【问题讨论】:

    标签: c# macros post-build-event post-build


    【解决方案1】:

    简单的答案。使用 Configuration Manager 创建 TargetPlatform 并从 AnyCpu 切换到 x86 或 x64,然后重新启动 VS。

    【讨论】:

      猜你喜欢
      • 2011-06-08
      • 1970-01-01
      • 1970-01-01
      • 2021-12-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多