gpt4 book ai didi

c# - WPF 针对 .NET 4.5 但 Windows 要求在应用程序运行时安装 .NET 3.5

转载 作者:行者123 更新时间:2023-12-03 11:12:52 26 4
gpt4 key购买 nike

我有针对 .NET 4.5 的 WPF 应用程序,但每当我使用该应用程序时,都会弹出此对话框。

这是我的 app.config 设置

<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>

image

如何停止显示这个对话框?是否需要在面向 .NET 4.5 时安装 .NET 3.5?

这是在 Windows 10 上发生的,没有对其他人进行测试。该应用程序无需安装 .NET 3.5 即可正常运行和工作

最佳答案

如果您的操作系统是 Windows 8 或没有 .NET 2.0......

并且您的代码以任何方式依赖于 .NET 2.0、3.0、3.5.....

这意味着它需要 .NET 2.0 才能运行。

因此它会提示您安装.NET 3.5。

这是由微软记录的:

Windows 8 Behavior and UI The CLR activation system provides the same behavior and UI on Windows 8 as it does on other versions of the Windows operating system, except when it encounters issues loading CLR 2.0. Windows 8 includes the .NET Framework 4.5, which uses CLR 4.5. However, Windows 8 does not include the .NET Framework 2.0, 3.0, or 3.5, which all use CLR 2.0. As a result, applications that depend on CLR 2.0 do not run on Windows 8 by default. Instead, they display the following dialog box to enable users to install the .NET Framework 3.5. Users can also enable the .NET Framework 3.5 in Control Panel.

几乎一直滚动到本文底部的标题: Windows 8 Behavior and UI

关于c# - WPF 针对 .NET 4.5 但 Windows 要求在应用程序运行时安装 .NET 3.5,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46864353/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com