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

Total
0
Shares

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


Solution

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.

Source: StackOverflow.com

Leave a Reply

Your email address will not be published. Required fields are marked *