jberezanski / ChocolateyPackages

Chocolatey packages maintained by me
MIT License
83 stars 51 forks source link

dotnetfx Package not installable: 'Install-DotNetFramework' is not recognized as the name of a cmdlet #135

Closed im-fabian closed 1 year ago

im-fabian commented 1 year ago

On Windows Server 2022 I can't upgrade from 4.8.0.20190930 to 4.8.0.20220524. I get the message 'Install-DotNetFramework' is not recognized as the name of a cmdlet.

Help is appreciated! :)

Terminal: You have dotnetfx v4.8.0.20190930 installed. Version 4.8.0.20220524 is available based on your source(s). Progress: Downloading dotnetfx 4.8.0.20220524... 100%

dotnetfx v4.8.0.20220524 dotnetfx package files upgrade completed. Performing other installation steps. ERROR: The term 'Install-DotNetFramework' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. The upgrade of dotnetfx was NOT successful. Error while running 'C:\ProgramData\chocolatey\lib\dotnetfx\tools\ChocolateyInstall.ps1'. See log for details.

jberezanski commented 1 year ago

The dotnetfx package depends on the chocolatey-dotnetfx.extension to provide this helper function. I'm guessing the extension package did not install successfully. Normally it should be done automatically by choco. Unless - did you by any chance use the --ignore-dependencies switch when calling choco?

im-fabian commented 1 year ago

Hi! Actually the chocolatey-dotnetfx.extension was installed but somehow broken – reinstalling it did the trick. In my case it was necessary to first uninstall chocolatygui and dotnetfx because they depend on it. Thanks for pointing me to the right direction.