microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
110.56k stars 6.51k forks source link

Powertoys keeps asking me to install .net core even though i have it? #8549

Closed MLJay1 closed 2 years ago

MLJay1 commented 3 years ago

ℹ Computer information

Whenever i try to launch Powertoys, it just tells me to install .NET Core, even though i already have it. I've already tried reinstalling Powertoys and reinstalling and repairing both .NET core (x64) and .NET core (x86).

📷 Screenshots

grafik

crutkas commented 3 years ago

What version of .net core do you have.

MLJay1 commented 3 years ago

What version of .net core do you have.

3.1

davidegiacometti commented 3 years ago

Hi @MisterLordJ Can execute dotnet --list-runtimes in a command prompt and post here the output?

MLJay1 commented 3 years ago

Microsoft.AspNetCore.App 3.1.10 [D:\HDD Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 3.1.10 [D:\HDD Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 3.1.10 [D:\HDD Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Oh, and sorry btw. I did not realize they were version 3.1.10, i thought it was just 3.1.

nayzm commented 3 years ago

I can vouch, having the same issue here.

davidegiacometti commented 3 years ago

Related to https://github.com/microsoft/PowerToys/issues/8396

@MisterLordJ are you able to run another desktop app writter in .NET Core 3.1? If you use .NET Core just for PowerToys can you uninstall both x86 and x64 and install just this one? https://dotnet.microsoft.com/download/dotnet-core/thank-you/runtime-desktop-3.1.10-windows-x64-installer x64 is enough for PowerToys.

MLJay1 commented 3 years ago

@davidegiacometti I uninstalled both .NET Cores, and installed only the one from the link you provided, but powertoys still gives me the same error on startup. (I only use .NET Core for powertoys, so i don't really have any program to test with)

RockChinQ commented 3 years ago

Is this issue solved?I'm with this problem for long time since I've bought a new computer. PT still ask for .net core though I've installed .net core 3.1.10. 屏幕截图 2020-12-13 113102

RockChinQ commented 3 years ago

oh,everyone ,I've solved this problem by changing system default install path. You can find that your .net core is installed to disk D: or another instead of C:. You can change register key at \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion with regedit.exe Make sure the keys are set to C: path. once you do that ,you can use PT normally. 屏幕截图 2020-12-13 113856 屏幕截图 2020-12-13 113917

*after you change register key,you need to reinstall .net core

enricogior commented 3 years ago

@RockChinQ thanks for figuring this out. We should now try to understand if this is a .NET Core bug or a PowerToys bug. I suspect it's a .NET Core bug since in PT we don't do anything specific to require .NET Core to be installed on the C: drive.

MLJay1 commented 3 years ago

I tried this solution, but it still doesn't seem to work? Just gives me the same error again. I'm pretty sure i did everything correctly, but i'll try again tomorrow and report the results.

szymonos commented 3 years ago

I have the same problem. image

Edit. OK, it seems that I've solved it. The installation of dotnet 3.1.15 was somehow broken (I've installed it through Visual Studio) - it was missing the file: C:\Program Files\dotnet\shared\Microsoft.NETCore.App\3.1.15\Microsoft.NETCore.App.deps.json Standard installation of dotnet runtime/SDK wasn't helping - but when I've selected repair installation of the runtime it added the file and PowerToys is working again :).

casscostello commented 3 years ago

Same issue for me, even after an installation repair...

dotnet --list-runtimes Microsoft.NETCore.App 3.1.16 [C:\Program Files (x86)\dotnet\shared\Microsoft.NETCore.App] Microsoft.WindowsDesktop.App 3.1.16 [C:\Program Files (x86)\dotnet\shared\Microsoft.WindowsDesktop.App]

crutkas commented 3 years ago

@yuyoyuppe has this been addressed with some of the recent tweaks?

yuyoyuppe commented 3 years ago

yes, we've improved our dotnet detection quite a bit

crutkas commented 3 years ago

Do we want to dup this then against a different issue with those fixes?

yuyoyuppe commented 3 years ago

the last change was done to the related code was done in https://github.com/microsoft/PowerToys/issues/7863, so @casscostello's issue is still unresolved. @casscostello, have you tried reinstalling dotnet manually? if not, could you please try?

tomaspipolo1 commented 3 years ago

I've solved the problem for me. .NET CORE 3.1 was installed on mi D: path, so I cut the "dotnet" folder and paste it on C: \Program Files . That's worked for me :)

crutkas commented 3 years ago

@yuyoyuppe do we properly handle @tomaspipolo1 scenario for having it installed on a different drive?

yuyoyuppe commented 3 years ago

We detect installed dotnet runtimes by executing dotnet --list-runtimes, so we assume it being available in %PATH%. As I understand, it's the intended way to do it. Looking at the dotnet installation docs, dotnet could be installed manually to another dir by specifying corresponding env vars. As I understand, it'd be still supported by dotnet tool, but I'll test it on a clean VM and post an update.

yuyoyuppe commented 3 years ago

Specifying env variables didn't have any effects, so perhaps the issue was caused by @tomaspipolo1's %programfiles% non-standard location?

tomaspipolo1 commented 3 years ago

Maybe it was for me. Hope u solve the problem

yuyoyuppe commented 3 years ago

@tomaspipolo1 Could you please check if your Program Files location is not C:\Program Files?

tomaspipolo1 commented 3 years ago

I changed it when I installed Windows 10. My Program Files location is D:\Program Files\

luqmannn commented 3 years ago

If you still had the problem when installing PowerToys, here's the working solution that I did:

  1. Restart your system.
  2. Run the installer again, but this time don't install .NET Core yet. Just let it finish.
  3. Start the PowerToys and it will prompt you bunch of errors said that you need to install .NET Core. Click Yes.
  4. It will bring you straight to the download page of .NET Core 3.1. In my case v3.1.16, download the .NET Core installer. (.NET Core installer name is windowsdesktop-runtime)
  5. Terminate PowerToys process first before installing .NET Core. Then start back PowerToys.
TBosak commented 3 years ago

I had this issue because my default install location is my D drive...I just created a symlink to the dotnet folder in my C drive and this fixed it.

mouridis commented 2 years ago

I have the same problem. New clean and fully updated installation of Win10 (21H1 - 19043.1288).

I installed Powertoys 0.47.1 and got this message. I followed the link to the download page of .NET Core and downloaded the installer. Here's the "dotnet --list-runtimes" output: image

All paths are default and on C: drive. Still powertoys insist on this message and don't work. I tried repairing the .NET core installation. I tried uninstalling both the core and powertoys, restart, and install in the correct order (core first, powertoys second). No good.

Any ideas are welcome.

yuyoyuppe commented 2 years ago

Thanks for the report. We're planning to change our dotnet installation mechanism in the next few upcoming releases, perhaps it could fix the issue.

mouridis commented 2 years ago

Sorry @yuyoyuppe - it's my mistake. I installed x86 version of .NET core. Upon installing x64 everything is fine. Sorry for spamming the issue thread.

bluespheal commented 2 years ago

This might be useful for anyone with the same problem as me, it turns out I was installing just the .NET Core Runtime while what PowerToys need is the .NET Core Desktop Runtime. Pretty easy to miss, specially if you are in a hurry.

Jay-o-Way commented 2 years ago

If the word "desktop" is critical, the installer should print that. I assume it downloads the correct version, though?

yuyoyuppe commented 2 years ago

Yes, it should get the correct one - see installer\PowerToysBootstrapper\bootstrapper\DotnetInstallation.cpp

AsciiWolf commented 2 years ago

Clean Windows 10 Pro installation, PowerToys from Microsoft Store. Same issue. Fixed by installing .NET Core Desktop Runtime manually.

crutkas commented 2 years ago

@MLJay1 can you try 0.53 and see if that fixes it?

crutkas commented 2 years ago

we changed the bundling system

ghost commented 2 years ago

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 5 days. It will be closed if no further activity occurs within 5 days of this comment.

jektvik commented 2 years ago

This still an issue. I'm on 0.55.1. On startup I get these, nonetheless the parent app starts into tray: image

But then I can't access other modules inside, f.ex. fancy zone builder: image Clicking 'yes' doesn't do anything on most of these popups btw. On the one where it did, installing the linked dotnet sdk/runtime/anything didn't help. I have various sdks and runtimes installed. Have attempted a clean reinstall of all but that didn't change jack. Dotnet CLI tools have Path priority issues of their own which I was fixing the other day, it's a dense jungle to navigate to have it all working as it should at the same point in time.

Currently don't know how to unblock the PowerToys - specifically the fancyZones editor I'm after

My runtimes available:

C:\Users\XXX>dotnet --list-runtimes
Microsoft.AspNetCore.App 6.0.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 3.1.22 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 5.0.13 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 6.0.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.22 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 5.0.13 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 6.0.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

EDIT: Finally found the missing install. Regardless of all hints what fixed it for me was grabbing this guy regardless that it's listed like already installed, it wasn't: https://dotnet.microsoft.com/en-us/download/dotnet/5.0 -> ASP.NET Core Runtime 5.0.13

Jeez louize, the naming jungle for dotnet Sdks and runtimes is a madhouse. Even their tooling gets confused about what's what.

crutkas commented 2 years ago

you shouldn't have needed asp.net, https://github.com/microsoft/PowerToys#requirements has the required runtimes.

cacafaca commented 2 years ago

Hi all,

This seams to be NETCore issue, as I see.

I had NETCore 3.1.16 and I removed it and installed 3.1.22 and got the same error. Than I told to myself: "PowerToys is the desktop app, you dummy!" So I went to the link that message box lead me to and installed that exe from the "Run Desktop Apps" section. image

To me it's like MS splitted NETCore to:

  1. NETCore, and
  2. WindowsDesktop

PS. Yes, it's working now. :)

aranapatona commented 1 year ago

arent these utilities done with c++? Whats the need for .net? is it just c++ calling .net apis?

definitelynotstarlord commented 10 months ago

This is still an issue in 0.43.0. While the true problem is described, the details have yet to be given on why it works for some but not others. I believe I have figured that out. I was working with 0.43.0 because that is what is currently packaged in prod and I am fixing issues with the settings.json file enforcing administrative mode...

When you install PowerToys without any prereqs, you will get multiple errors asking if you want to download .Net Core. All of these download prompts with the exception of "PowerToys.Settings.exe" download the correct "windowsdesktop-runtime-%.exe" installer. "PowerToys.Settings.exe" downloads "dotnet-runtime-%.exe" which continues with the errors.

PowerToys 0.75.1 appears to no longer have this dependency so I guess it is a moot point now. There is not a real point for me posting this except that if you are responsible for deploying PowerToys to your users, you might need to know since prior to 0.75.1 you would needed to have included a dependency on the .Net Core Desktop application.