应用程序警告安装

应用程序警告安装

本文介绍了已发布的 .Net Core 应用程序警告安装 .Net Core 但它已经安装的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我制作了一个 WPF 和控制台应用程序,供某人在我无法访问的私人服务器上使用.我使用 Visual Studio 2019 的内置发布向导"来创建依赖于框架的单文件应用程序.当此人打开 WPF 应用程序时,他们会收到标准警告:

I made a WPF and Console application for someone to use on their private server which I can't have access to. I used Visual Studio 2019's built-in "Publishing Wizard" to create Framework Dependant single-file apps. When the person opened the WPF app they were greeted with the standard warning:

他们点击是,据我所知,他们安装了 .Net Core 3.1,这是应用程序的目标.

They clicked yes and to my understanding, they installed .Net Core 3.1 which is what the applications target.

在他们重新启动计算机后,他们再次收到完全相同的警告.我不确定发生了什么,所以我将这些应用程序重新打包为独立的,因为安装的 .Net Core 版本与我的应用程序的目标版本相同.

After they restarted the computer they got the exact same warning again. I wasn't sure what was going on so I repackaged the apps as self-contained since the installed version of .Net Core was the same as what my applications were targeting.

这似乎有点奏效.我们遇到了一些不相关的问题,我不得不在我的代码中修复这些问题,然后我重新发布了项目并将它们发送出去.

That seemed to work for a little bit. We ran into some unrelated issues that I had to fix in the code on my end and then I re-published the projects and sent them out.

他们尝试使用 WPF 应用程序,但再次收到安装警告.

They tried to use the WPF application and they got the install warning again.

现在无论我在发布向导"中选择何种选项组合,他们都会收到警告.

Now no matter what combination of options I pick in the "Publish Wizard" they keep getting the warning.

我不知道该怎么办.

这是我发布设置的图片

推荐答案

事实证明,问题在于应用程序面向 win-x86,而用户只能访问 .Net Core 的 64 位运行时.

Turns out the issue was the fact that the applications were targeting win-x86 and the user only had access to 64-bit runtimes of .Net Core.

出于某种原因,我认为即使它运行的是 64 位运行时,它也能够处理 32 位版本.

For some reason, I thought it would be able to handle a 32-bit version even if it was running 64-bit runtimes.

我想生活和学习.

这篇关于已发布的 .Net Core 应用程序警告安装 .Net Core 但它已经安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 11:33