dotnetcore-chocolatey / dotnetcore-chocolateypackages

Chocolatey packages for .NET Core
MIT License
13 stars 9 forks source link

(dotnetcore-runtime.install) Installation fails when RSAT installed #39

Closed mkevenaar closed 3 years ago

mkevenaar commented 5 years ago

Hi,

I have the RSAT (Remote Server Administration Tools) installed on my Windows 10 machine. Due to this, the POSH cmdlet Get-WindowsFeature exists and L18 of the ChocolateyInstall.ps1 will not be $null

https://github.com/dotnetcore-chocolatey/dotnetcore-chocolateypackages/blob/master/dotnetcore-runtime.install/tools/ChocolateyInstall.ps1#L18

You can't execute Get-WindowsFeature targeting a client machine, resulting in an error message.

dotnetcore-runtime.install v2.2.1 [Approved]
dotnetcore-runtime.install package files install completed. Performing other installation steps.
Progress: 100% - 100%                                                                                                                                                        ERROR: The target of the specified cmdlet cannot be a Windows client-based operating system.
The install of dotnetcore-runtime.install was NOT successful.
Error while running 'C:\ProgramData\chocolatey\lib\dotnetcore-runtime.install\tools\ChocolateyInstall.ps1'.
 See log for details.

Chocolatey installed 0/1 packages. 1 packages failed.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Failures
 - dotnetcore-runtime.install (exited -1) - Error while running 'C:\ProgramData\chocolatey\lib\dotnetcore-runtime.install\tools\ChocolateyInstall.ps1'.
 See log for details.
ExterminatorX99 commented 5 years ago

You can bypass the problem by downloading the package manually and changing the ChocolateyInstall.ps1 file inside the nupkg file. If you change line 18 into $getWindowsFeature = $null the problem is ignored.

erm-an commented 4 years ago

Did you find any solution for this?

jberezanski commented 3 years ago

Fixed (#55)

jberezanski commented 3 years ago

To be more specific, fixed packages were pushed for 2.1 and 3.1. 5.0 will gain this fix once Microsoft releases a new RC or the final product. Other version families are out of Microsoft support, so I doubt anyone cares about them anymore.