【问题标题】:Error while generating a batch build for exe file generation生成用于生成 exe 文件的批处理构建时出错
【发布时间】:2022-01-01 20:28:50
【问题描述】:

批量构建时生成exe文件时出现错误。

我的配置如下:

enter image description here

Severity    Code    Description Project File    Line    Suppression State
Error       CefSharp.Common is unable to proceeed as your current Platform is 'AnyCPU'. To target AnyCPU please read https://github.com/cefsharp/CefSharp/issues/1714. Alternatively change your Platform to x86 or x64 and the relevant files will be copied automatically. For details on changing your projects Platform see https://docs.microsoft.com/en-gb/visualstudio/ide/how-to-configure-projects-to-target-platforms?view=vs-2017    MERP            

此外,我在桌面中安装 exe 时遇到错误,因为它具有受信任的问题,我对这项技术非常陌生。请帮忙

【问题讨论】:

  • 您是否考虑过访问错误中提到的链接?阅读后您还有其他问题吗?这些问题是什么?
  • 我已经检查过了,但是我很新,所以无法理解该怎么做
  • 它说你需要针对特定​​的架构,所以是 x86 或 x64,而不是 AnyCPU。
  • 欢迎来到 StackOverflow,如果答案解决了您的问题,请将其标记为已接受的答案。如果它帮助你给它一个upvote。如果答案离题或根本没有帮助,请投反对票或添加评论。另请参阅stackoverflow.com/help/why-vote 如果您不介意,可以单击“✔”将我的回复标记为已接受答案。它还将帮助其他人解决类似的问题。

标签: c# .net visual-studio-2019 desktop-application


【解决方案1】:

仔细阅读官方documentation

将项目配置为面向 64 位平台

  1. 在菜单栏上,选择Build > Configuration Manager

  2. Active solution platform list 中,为解决方案选择一个 64 位平台,然后选择关闭按钮。

一个。如果您想要的平台没有出现在 Active solution platform 列表中,请选择 New。

b.出现New Solution Platform 对话框。在Type or select the new platform 列表中,choose x64

c。如果要从当前平台配置中复制设置,请选择它,然后选择 OK 按钮

以下链接也可以帮助您。

  1. 1
  2. 2

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-06-06
    • 2023-03-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多