首页 > 解决方案 > 如何使用 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 解决方案的简单方法吗?

标签: c#wpfpublishrider

解决方案


我使用https://wixtoolset.org/发布我的应用程序。它是免费的并且独立于 IDE...


推荐阅读