Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

.net

wpf

.net-5

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.

enter image description here

enter image description here

But still getting error .

Update :

But Self contained package working fine . enter image description here

like image 707
Jophy job Avatar asked Jun 23 '21 14:06

Jophy job


People also ask

What is .NET 5 framework?

NET 5 is an open-source, cross-platform . NET framework, that will replace . Net Framework, . Net Core, and Xamarin with a single unified platform. .

Can I delete Microsoft Windows desktop runtime?

Unless your application has specific reasons for earlier SDKs or runtimes, you may safely remove older versions.

What is .NET desktop runtime?

.NET Desktop Runtime 7.0.0 The .NET Desktop Runtime enables you to run existing Windows desktop applications. This release includes the .NET Runtime; you don't need to install it separately.


1 Answers

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: .NET 5.0.7 Runtime download note

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.

like image 124
Eriawan Kusumawardhono Avatar answered Sep 21 '22 09:09

Eriawan Kusumawardhono