简体   繁体   English

Visual Studio 2019 应用程序需要 .NET 框架

[英]Visual Studio 2019 The application requires .NET framework

I've created a simple console app (to run on .NET framework).我创建了一个简单的控制台应用程序(在 .NET 框架上运行)。

Running the app I see the following message:运行应用程序我看到以下消息:

在此处输入图像描述

But I have this version installed as can seen in the drop down:但是我已经安装了这个版本,如下拉列表所示:

在此处输入图像描述

在此处输入图像描述

Anyone familiar with this?有谁熟悉这个?

As phuzi said.正如普子所说。 As phuzi said.正如普子所说。

Configure the app.config file:配置 app.config 文件:

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

Official Microsoft documentation: link .微软官方文档: 链接

Hope it helps you.希望它可以帮助你。

I was fortunate to experience this, some forums talking about changes in the registry but what worked was to comment out the supportedRuntime element in the configuration file of the application.我很幸运地经历了这一点,一些论坛谈论注册表的变化,但有效的是注释掉应用程序配置文件中的 supportedRuntime 元素。

Supported runtime element 支持的运行时元素

在此处输入图像描述

Theres an interesting post here: What happens when removing auto added supportedRuntime element这里有一个有趣的帖子: 删除自动添加的supportedRuntime 元素时会发生什么

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Visual Studio 2019 未显示 .NET 5 框架 - Visual Studio 2019 Not Showing .NET 5 Framework 如何在 Visual Studio 2019 中调试 .NET 5 WinForms 应用程序,该应用程序引用 .NET Framework 4.8 class 库 - Howto debug .NET 5 WinForms application that references .NET Framework 4.8 class library in Visual Studio 2019 如何在 Visual Studio 2005 或 2019 中为 .NET Framework 2.0 编译一个简单的 WinForms C# 应用程序? - How do I compile a simple WinForms C# application for .NET Framework 2.0 in Visual Studio 2005 or 2019? 如何将 Visual Studio 2019 中的 .NET 版本更改为 .NET Framework 4.7.2? - How to change .NET version in Visual Studio 2019 to .NET Framework 4.7.2? .NET Framework 4.8 已安装但未在 Visual Studio 2019 社区中显示 - .NET Framework 4.8 is installed but not showing in Visual Studio 2019 community 在 Visual Studio 2019 / .NET Framework 4.8 中确定 C# 版本 - Determine C# version in Visual Studio 2019 / .NET Framework 4.8 如何将 .Net 框架添加到 Visual Studio preview 2019 项目 - How to add .Net framework to Visual Studio preview 2019 project Visual Studio mac 2019(社区) - PresentationCore - 未找到 .Net Framework 4 的程序集 - Visual Studio mac 2019 (Community) - PresentationCore - Assembly not found for .Net Framework 4 Visual Studio 2019 中的 .NET 框架 4 缺少 MVC 模板 - MVC template missing for .NET framework 4 in Visual Studio 2019 Visual Studio 2019 - 将 .NET 目标框架更改为 4.8 - Visual Studio 2019 - change .NET target framework to 4.8
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM