microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
110.46k stars 6.5k forks source link

'You must install .NET Desktop Runtime to run this application', but installed. #20266

Closed neko3cs closed 2 years ago

neko3cs commented 2 years ago

Microsoft PowerToys version

"0.61.1"

Running as admin

Area(s) with issue?

General

Steps to reproduce

  1. Update PowerToys "0.61.1"
  2. Launch PowerToys

✔️ Expected Behavior

Launch PowerToys Correctly.

❌ Actual Behavior

Error occured and can not launch PowerToys.

image

Other Software

dotnet info

image

Jay-o-Way commented 2 years ago

The difference is between 6.0.7 and 6.0.8 CC @crutkas @jaimecbernardo

ghost commented 2 years ago

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

yanhuan521 commented 2 years ago

image

I also encountered the same problem: no matter what version of. Net is installed, I can't run PowerToys correctly.

What should I do to use PowerToys normally?

neko3cs commented 2 years ago

@Jay-o-Way I update PowerToys to version "0.62.0". And same error has occured. .NET 6.0.8 Desktop Runtime has installed, but error say "You must install .NET Desktop Runtime to run this application".

I don't think this error is not same error of #20236, because my computer has connected to the internet.

thank you.

Error Dialog

image

dotnet info

image

Jay-o-Way commented 2 years ago

Try installing it manually. https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-desktop-6.0.8-windows-x64-installer The Desktop part is critical here, it's something different than e.g. .NET SDK

yanhuan521 commented 2 years ago

@Jay-o-Way image image

I still can't run correctly with version 0.62, and I downloaded and installed it manually Net runtime. The bug report function of the software can not generate a bug file. I wonder if something in the computer system or some "Settings" prevent "PowerToys" from recognizing ". Net runtime"

Jay-o-Way commented 2 years ago

tag @jaimecbernardo

jaimecbernardo commented 2 years ago

This is pretty weird. How are the contents of "C:\Program Files\dotnet\shared\Microsoft.Windows.Desktop.App/6.0.8" ? Can you please send a screenshot?

neko3cs commented 2 years ago

Yes, I installed ".NET Desktop Runtime". But the error has occured.

Thank you for your reopen issue and added Servety-Crash tag.

yanhuan521 commented 2 years ago

@jaimecbernardo

PS C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\6.0.8> dir

目录: C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\6.0.8

Mode LastWriteTime Length Name


d----- 2022/9/6 5:05 cs d----- 2022/9/6 5:05 de d----- 2022/9/6 5:05 es d----- 2022/9/6 5:05 fr d----- 2022/9/6 5:05 it d----- 2022/9/6 5:05 ja d----- 2022/9/6 5:05 ko d----- 2022/9/6 5:05 pl d----- 2022/9/6 5:05 pt-BR d----- 2022/9/6 5:05 ru d----- 2022/9/6 5:05 tr d----- 2022/9/6 5:05 zh-Hans d----- 2022/9/6 5:05 zh-Hant -a---- 2022/7/22 15:08 21120 Accessibility.dll -a---- 2021/9/11 20:05 4895184 D3DCompiler_47_cor3.dll -a---- 2022/7/22 15:09 519312 DirectWriteForwarder.dll -a---- 2022/7/22 15:07 19080 Microsoft.VisualBasic.dll -a---- 2022/7/22 15:09 243328 Microsoft.VisualBasic.Forms.dll -a---- 2022/7/22 15:09 26760 Microsoft.Win32.Registry.AccessControl.dll -a---- 2022/7/22 15:09 87176 Microsoft.Win32.SystemEvents.dll -a---- 2022/7/18 18:57 30911 Microsoft.WindowsDesktop.App.deps.json -a---- 2022/7/18 18:57 288 Microsoft.WindowsDesktop.App.runtimeconfig.json -a---- 2022/7/22 15:08 158856 PenImc_cor3.dll -a---- 2022/7/22 15:09 8666240 PresentationCore.dll -a---- 2022/7/22 15:09 27280 PresentationFramework-SystemCore.dll -a---- 2022/7/22 15:09 24200 PresentationFramework-SystemData.dll -a---- 2022/7/22 15:09 23176 PresentationFramework-SystemDrawing.dll -a---- 2022/7/22 15:09 24200 PresentationFramework-SystemXml.dll -a---- 2022/7/22 15:09 19584 PresentationFramework-SystemXmlLinq.dll -a---- 2022/7/22 15:09 450704 PresentationFramework.Aero.dll -a---- 2022/7/22 15:09 456832 PresentationFramework.Aero2.dll -a---- 2022/7/22 15:09 228992 PresentationFramework.AeroLite.dll -a---- 2022/7/22 15:09 266368 PresentationFramework.Classic.dll -a---- 2022/7/22 15:09 16283792 PresentationFramework.dll -a---- 2022/7/22 15:09 672896 PresentationFramework.Luna.dll -a---- 2022/7/22 15:09 328832 PresentationFramework.Royale.dll -a---- 2022/6/15 0:28 1234592 PresentationNative_cor3.dll -a---- 2022/7/22 15:09 1287816 PresentationUI.dll -a---- 2022/7/22 15:09 1640584 ReachFramework.dll -a---- 2022/7/22 15:09 486544 System.CodeDom.dll -a---- 2022/7/22 15:09 1006216 System.Configuration.ConfigurationManager.dll -a---- 2022/7/22 15:07 21640 System.Design.dll -a---- 2022/7/22 15:09 306832 System.Diagnostics.EventLog.dll -a---- 2022/7/22 15:09 272008 System.Diagnostics.PerformanceCounter.dll -a---- 2022/7/22 15:09 1067152 System.DirectoryServices.dll -a---- 2022/7/22 15:09 1043088 System.Drawing.Common.dll -a---- 2022/7/22 15:07 15496 System.Drawing.Design.dll -a---- 2022/7/22 15:07 21128 System.Drawing.dll -a---- 2022/7/22 15:09 280192 System.IO.Packaging.dll -a---- 2022/7/22 15:09 994432 System.Printing.dll -a---- 2022/7/22 15:09 120448 System.Resources.Extensions.dll -a---- 2022/7/22 15:09 820352 System.Security.Cryptography.Pkcs.dll -a---- 2022/7/22 15:09 44176 System.Security.Cryptography.ProtectedData.dll -a---- 2022/7/22 15:05 445568 System.Security.Cryptography.Xml.dll -a---- 2022/7/22 15:09 172176 System.Security.Permissions.dll -a---- 2022/7/22 15:09 73360 System.Threading.AccessControl.dll -a---- 2022/7/22 15:10 1462408 System.Windows.Controls.Ribbon.dll -a---- 2022/7/22 15:09 76416 System.Windows.Extensions.dll -a---- 2022/7/22 15:09 5359232 System.Windows.Forms.Design.dll -a---- 2022/7/22 15:07 16520 System.Windows.Forms.Design.Editors.dll -a---- 2022/7/22 15:09 13309064 System.Windows.Forms.dll -a---- 2022/7/22 15:09 792208 System.Windows.Forms.Primitives.dll -a---- 2022/7/22 15:09 128128 System.Windows.Input.Manipulations.dll -a---- 2022/7/22 15:09 20096 System.Windows.Presentation.dll -a---- 2022/7/22 15:09 1434752 System.Xaml.dll -a---- 2022/7/22 15:09 410760 UIAutomationClient.dll -a---- 2022/7/22 15:09 873616 UIAutomationClientSideProviders.dll -a---- 2022/7/22 15:09 50304 UIAutomationProvider.dll -a---- 2022/7/22 15:09 302208 UIAutomationTypes.dll -a---- 2022/6/27 1:08 98720 vcruntime140_cor3.dll -a---- 2022/7/22 15:09 2258064 WindowsBase.dll -a---- 2022/7/22 15:09 205952 WindowsFormsIntegration.dll -a---- 2022/7/22 15:09 1958544 wpfgfx_cor3.dll

PS C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App\6.0.8>

yanhuan521 commented 2 years ago

PowerToysReport_2022-09-08-01-47-37.zip I think there is no error in the installation file of ". Net desktop runtime". This bug feedback file was created using version 0.61.1. This file cannot be created in version 0.62.0. Is it possible that our computer lacks some important files or has made some wrong settings.

neko3cs commented 2 years ago

@jaimecbernardo Here. Thank you for your debugging.

image

jaimecbernardo commented 2 years ago

Quite not sure what's going on here. It looks like you have it in place. I've read this might be caused by VC++ Redistributables on a random post. Can you please check out what redistributables you have installed like this? (Just to make sure it's not related) image

jaimecbernardo commented 2 years ago

Can you plase check the following registry keys to check if they have 6.0.8 registered? Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x64\sharedfx\Microsoft.WindowsDesktop.App and Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\x64\sharedfx\Microsoft.NETCore.App

yanhuan521 commented 2 years ago

@jaimecbernardo Here. Thank you for your debugging. image VeryCapture_20220909111353

neko3cs commented 2 years ago

@jaimecbernardo Here.

App List

image

Registry

Microsoft.WindowsDesktop.Runtime

image

Microsoft.NETCore.App

image

jaimecbernardo commented 2 years ago

Everything seems to be in place 🤷 Let's try download the installer and choosing the "Repair" option, please? https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-desktop-6.0.8-windows-x64-installer Let me know how it goes?

image

yanhuan521 commented 2 years ago

@jaimecbernardo This kind of behavior has no effect, and the problem still exists.

neko3cs commented 2 years ago

@jaimecbernardo Same with yanhuan521. I tryed it, but the problem is not resolved.

neko3cs commented 2 years ago

I reinstall dotnet desktop runtime 6.0.8 and powertoys, but the problem is not resolved...

jaimecbernardo commented 2 years ago

Not sure what might be going on here. Tried checking the logs sent by @yanhuan521 for 0.61.1, but for that version it looks like PowerToys Run was starting well. Can you please send some logs from having tried to run 0.62.0? If bug report is not working for you, try this workaround: https://github.com/microsoft/PowerToys/issues/20297#issuecomment-1239390227

Can you also try running PowerToys without admin privileges? At this point I wonder if it's something related to PowerToys user not being the same as the one that's used to start PowerToys at startup and having some access issues to the .net runtimes, although this would not make much sense in my opinion. But the .net being there and not be recognize at runtime makes little sense as it is 😅

yanhuan521 commented 2 years ago

According to the method you provided, the file was created successfully. PowerToysReport_2022-09-13-23-25-29.zip The result of running the software with and without administrator authority is the same.

neko3cs commented 2 years ago

I tried that workaround, and I can get logs.

PowerToysReport_2022-09-14-18-18-50.zip

I can not open PowerToys Settings, so I don't know how run PowerToys without administrator under the "Always Running Administrator" option is on.

jaimecbernardo commented 2 years ago

Does installing .net 6.0.9 solve this? https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-desktop-6.0.9-windows-x64-installer

yanhuan521 commented 2 years ago

image

I installed ". net runtime desktop - 6.0.9" and upgraded "PowerToys" to version 0.62.1. However, the problem remains.

It seems that ". net runtime" cannot be found in "PowerToys"!

Thank you for your debugging.

I really like this software and hope to use it again.

here@jaimecbernardo

neko3cs commented 2 years ago

Does installing .net 6.0.9 solve this?

@jaimecbernardo I tried it, but same error has occured.

Can you do any research from this report file? PowerToysReport_2022-09-20-10-08-53.zip

jaimecbernardo commented 2 years ago

Does installing .net 6.0.9 solve this?

@jaimecbernardo I tried it, but same error has occured.

Can you do any research from this report file? PowerToysReport_2022-09-20-10-08-53.zip

dotnet-installation-info.txt inside the Bug Report makes it look like everything it's fine. It's not clear why it's not being detected by the apps:

Microsoft.AspNetCore.All 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]

Microsoft.AspNetCore.App 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]

Microsoft.AspNetCore.App 3.1.29 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]

Microsoft.AspNetCore.App 6.0.9 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]

Microsoft.NETCore.App 2.1.30 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

Microsoft.NETCore.App 3.1.29 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

Microsoft.NETCore.App 6.0.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

Microsoft.NETCore.App 6.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]

Microsoft.WindowsDesktop.App 3.1.29 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Microsoft.WindowsDesktop.App 6.0.8 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Microsoft.WindowsDesktop.App 6.0.9 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other users seem to be having the same error from doing a different installation method for .net. I don't think this seems to be your case, though: https://github.com/microsoft/PowerToys/issues/411#issuecomment-1249248010

jaimecbernardo commented 2 years ago

There's reference here to some environment variables that might be changing .net resolution: https://github.com/microsoft/PowerToys/issues/411#issuecomment-1185372359 Are these set up in your machine in any way?

yanhuan521 commented 2 years ago

It's great. I set it according to the method of # 411 (comment) . Now I can use "powertoys". Thank you very much.@jaimecbernardo

yanhuan521 commented 2 years ago

image image image image There are also some problems. These four functions cannot run correctly, and an error dialog box will pop up when you use them. How to set it.

neko3cs commented 2 years ago

@jaimecbernardo

This settings?👇

  1. Add new User environment variable DOTNET_ROOT=\dotnet DOTNET_MULTILEVEL_LOOKUP=0 Add also to your path PATH=%DOTNET_ROOT%;%PATH%

I check my settings using pwsh, and I confirmed it.

image

Thanks.

jaimecbernardo commented 2 years ago

@neko3cs , so this means that these settings are likely messing with the .net lookup from PowerToys. Can you please remove DOTNET_ROOT and DOTNET_MULTILEVEL_LOOKUP from your environment variables and see if that fixes the issue?

neko3cs commented 2 years ago

@jaimecbernardo Wow, the problem is solved.

Sorry, I didn't explained enoughly. When I checked that setting, DOTNET_MULTILEVEL_LOOKUP was not set. So I set DOTNET_MULTILEVEL_LOOKUP=0.

I think this problem cause is DOTNET_ROOT.

I'm grateful for your help.