c# - 如何使用 Rider 发布我的 WPF 解决方案?
问题描述
我似乎无法使用 Rider IDE 部署我的 WPF 应用程序。大多数支持告诉我使用 VS 中的“发布”按钮,这当然对我没有帮助。
我确实使用.NET Project和.NET Executable build Configurations 生成了一个可执行文件,但它似乎没有在任何其他机器上运行,它似乎立即关闭而没有吐出错误消息(甚至来自 PowerShell)
请注意,该应用程序可以从我自己的机器上正常启动,也可以从我选择将其移动到的任何地方启动。
我试图将Edit Configurations...
>设置Runtime arguments:
为
dotnet publish -c Release -r win10-x64
正如这篇文章中所建议的那样,但这还不够。
从 PowerShell运行dotnet publish -c Release -r win10-x64 .\my_app.csproj
返回
error MSB4216: Impossible to execute the task "GenerateResource"
[...]
Failed to connect to "CLR4" runtime and the "x86" architecture.
Make sure that
(1) The necessary runtime and/or architecture is present on the machine
(2) "C:\Program Files\dotnet\sdk\<version>\MSBuild.exe" exists and
has permissions to execute.
现在该文件夹中缺少 MSBuild,但那里有 MSBuild.dll。
我真的错过了用 Rider 发布 C# WPF 解决方案的简单方法吗?
解决方案
我使用https://wixtoolset.org/发布我的应用程序。它是免费的并且独立于 IDE...
推荐阅读
- rust - 我可以以某种方式修改“&”数组吗?
- excel - ruby/caxlsx:如何定义不同的周围单元格的边框样式?
- ios - SwiftUI 预览不适用于自定义库
- visual-studio - 在 .Net Core 5 Web API 中将连接字符串更改为 MySql 数据库并在 VS Debug 模式下运行,直到第二次 API 重新启动后才会生效
- macos - 在旧 Mac 上升级到最新版本的 Cmake?
- swagger - springdoc-openapi-ui 无法识别输入参数
- laravel - Laravel - Concatenate 和 COALESCE 的组合失败
- python - 我正在尝试使用 Python 编程为所有商品抓取一个大型超市网站。我坚持使用 json.loads() 命令。这是我的代码
- django - Django 多表继承子类的空查询集
- visual-studio - Visual Studio 扩展 - 更快地获取和设置文本