You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When Chocolatey CLI v1.0.0 attempts to load Chocolatey Licensed Extension versions less than v4.0.0, it halts execution with an unclear and unhelpful error message
#2656
Executing choco.exe results in the following error:
The registered delegate for type IEnumerable threw an exception. Could not load type 'chocolatey.infrastructure.app.commands.ChocolateyVersionCommand' from assembly 'choco, Version=1.0.0.0, Culture=neutral, PublicKeyToken=79d02ea9cad655eb'.
Following the release of Chocolatey v1.0.0, there are two situations that are occurring that are causing problems, both of which relate to environments where the Chocolatey Licensed Extension is installed.
Chocolatey is upgraded first, before updating Chocolatey Licensed Extension
As documented in the release notes when upgrading to v1.0.0, if you are using Chocolatey Licensed Extension, you should first upgrade the chocolatey.extension package. This will ensure that all required dependencies are installed, including chocolatey itself.
If this process is not followed, there will be errors the next time choco is executed, since it will still be attempting to load the old Chocolatey Licensed Extension, which is no longer compatible, due to the commands that have been removed.
Once in this situation, it isn't possible to upgrade the chocolatey.extension package, since choco is essentially broken. There are steps to remediate this problem though, so if you are facing this, reach out to support.
Chocolatey is upgraded, when an older version of Chocolatey Licensed Extension is being used due to usage of Perpetual Chocolatey License
In this scenario, it isn't possible to first upgrade the chocolatey.extension package, as the customer doesn't have access to a new version.
What is Expected?
When upgrading Chocolatey, it should continue to work with older versions, so that follow up commands can be executed to upgrade the chocolatey.extension package, or allow usage of older package versions (perhaps with reduced functionality).
How Did You Get This To Happen? (Steps to Reproduce)
With Chocolatey CLI v0.12.1 installed and Chocolatey Licensed Extension v3.2.0 installed:
Run choco upgrade chocolatey
Run any Chocolatey command
See the error mentioned above
Output Log
The registered delegate for type IEnumerable threw an exception. Could not load type 'chocolatey.infrastructure.app.commands.ChocolateyVersionCommand' from assembly 'choco, Version=1.0.0.0, Culture=neutral, PublicKeyToken=79d02ea9cad655eb'.
The text was updated successfully, but these errors were encountered:
This commit re-instates the ChocolateyVersionCommand and
ChocolateyUpdateCommand classes, however, it doesn't provide any
implementations for the methods within the ICommand interface. In
addition, it also doesn't decorate the class with the CommandFor
attribute.
This has the effect that the commands still remain as unfound when
using Chocolatey CLI open source edition, however, it means that anyone
using an older version of the Chocolatey Licensed Extension (for
example perpetual licensed customers) will still have a basic
implementation of these commands that can be overridden.
The Exception that is thrown when one of the implemented methods is
executed is designed to match closely to the command not found error,
which is actually what we _want_ folks to see.
This change also has the side-effect of meaning that anyone directly
upgrading the chocolatey package, without first upgrading the
chocolatey.extension package, will no longer be broken after that
installation.
So that when we look back on this, we will remember why these classes
were re-instated.
gep13
changed the title
TBD
Chocolatey v1.0.0 doesn't work with version of the Chocolatey Licensed Extension less than v4.0.0
Mar 24, 2022
gep13
changed the title
Chocolatey v1.0.0 doesn't work with version of the Chocolatey Licensed Extension less than v4.0.0
Chocolatey v1.0.0 doesn't work with versions of the Chocolatey Licensed Extension less than v4.0.0
Mar 24, 2022
gep13
changed the title
Chocolatey v1.0.0 doesn't work with versions of the Chocolatey Licensed Extension less than v4.0.0
When Chocolatey CLI v1.0.0 attempts to load Chocolatey Licensed Extension versions less than v4.0.0, it halts execution with an unclear and unhelpful error message
Mar 24, 2022
* hotfix/1.0.1:
(version) Ensure usage of build date
(#2656) Add information to class
(#2656) Re-instate the update and version commands
(version) v1.0.1-beta
* master:
(version) v1.0.1
(version) Ensure usage of build date
(#2656) Add information to class
(#2656) Re-instate the update and version commands
(version) v1.0.1-beta
What You Are Seeing?
Executing choco.exe results in the following error:
Following the release of Chocolatey v1.0.0, there are two situations that are occurring that are causing problems, both of which relate to environments where the Chocolatey Licensed Extension is installed.
Chocolatey is upgraded first, before updating Chocolatey Licensed Extension
As documented in the release notes when upgrading to v1.0.0, if you are using Chocolatey Licensed Extension, you should first upgrade the chocolatey.extension package. This will ensure that all required dependencies are installed, including chocolatey itself.
If this process is not followed, there will be errors the next time
choco
is executed, since it will still be attempting to load the old Chocolatey Licensed Extension, which is no longer compatible, due to the commands that have been removed.Once in this situation, it isn't possible to upgrade the chocolatey.extension package, since choco is essentially broken. There are steps to remediate this problem though, so if you are facing this, reach out to support.
Chocolatey is upgraded, when an older version of Chocolatey Licensed Extension is being used due to usage of Perpetual Chocolatey License
In this scenario, it isn't possible to first upgrade the chocolatey.extension package, as the customer doesn't have access to a new version.
What is Expected?
When upgrading Chocolatey, it should continue to work with older versions, so that follow up commands can be executed to upgrade the chocolatey.extension package, or allow usage of older package versions (perhaps with reduced functionality).
How Did You Get This To Happen? (Steps to Reproduce)
With Chocolatey CLI v0.12.1 installed and Chocolatey Licensed Extension v3.2.0 installed:
choco upgrade chocolatey
Output Log
The text was updated successfully, but these errors were encountered: