未找到框架“Microsoft.WindowsDesktop.App",版本“5.0.0" [英] The framework 'Microsoft.WindowsDesktop.App', version '5.0.0' was not found

查看:710
本文介绍了未找到框架“Microsoft.WindowsDesktop.App",版本“5.0.0"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 .Net 5.0 创建了一个 WPF 应用程序.它在我的开发系统中运行良好.

但是当我尝试将 bin 文件夹复制并运行到我的 Windows 7 系统时,出现以下错误:

<块引用>

未找到框架Microsoft.WindowsDesktop.App",版本5.0.0".

但是还是报错.

更新:

但自包含的包工作正常.

解决方案

这种情况是由于您的另一台计算机可能没有运行 .NET 5.0 WPF 应用所需的 .NET 5.0.7 桌面运行时.

该图显示您在安装 .NET 5.0.7 运行时后仍需手动安装 .NET 5.0.7 桌面运行时.

因此,要解决您的问题,您必须安装 .NET 5.0.7 Desktop Runtime,而不仅仅是安装 .NET 5.0.7 Runtime.

Hi I create one WPF application using .Net 5.0 . It is working fine in my dev system .

But when i try to copy and run bin folder to my windows 7 system , It is giving below error :

The framework 'Microsoft.WindowsDesktop.App', version '5.0.0' was not found.

But still getting error .

Update :

But Self contained package working fine .

解决方案

This condition is caused by the fact that your other machine may not have the required .NET 5.0.7 Desktop runtime to run your .NET 5.0 WPF app.

On the official page to download .NET 5.0, each SDK and related runtime version has its own notes. If you only install .NET 5.0 runtime, it won't install the related .NET 5.0 Desktop runtime to support WPF and Windows Forms.

For example:

That picture shows that you still have to install .NET 5.0.7 Desktop Runtime manually after you install .NET 5.0.7 runtime.

Therefore to fix your problem, you have to install .NET 5.0.7 Desktop Runtime, not just installing .NET 5.0.7 Runtime.

这篇关于未找到框架“Microsoft.WindowsDesktop.App",版本“5.0.0"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆