MahApps / MahApps.Metro

A framework that allows developers to cobble together a better UI for their own WPF applications with minimal effort.
https://mahapps.com
MIT License
9.29k stars 2.45k forks source link

MahApps.Metro v2.4.8 uses wrong version range for ControlzEx dependency #4194

Closed punker76 closed 2 years ago

punker76 commented 2 years ago

Discussed in https://github.com/MahApps/MahApps.Metro/discussions/4193

Originally posted by **pkMoser** October 14, 2021 I would like to update MahApps.Metro v2.4.8 via NuGet package, but I got this error: "Unable to resolve dependencies. 'ControlzEx 5.0.1' is not compatible with 'MahApps.Metro 2.4.8 constraint: ControlzEx (>= 4.4.0 && < 5.0.0)'" Is it possible to change this constraint? Thank you for your response.
gabriel-vanca commented 2 weeks ago

This problem occurs again now. I'm getting: Unable to resolve dependencies. 'ControlzEx 6.0.0' is not compatible with 'MahApps.Metro 2.4.10 constraint: ControlzEx (>= 4.4.0 && < 6.0.0)'.

punker76 commented 2 weeks ago

@gabriel-vanca Is there perhaps another package that has a higher dependency on ControlzEx?

gabriel-vanca commented 1 week ago

I doubt that's the problem. I've tried with -IgnoreDependencies too. Still getting this error:

One or more unresolved package dependency constraints detected in the existing packages.config file. All dependency constraints must be resolved to add or update packages. If these packages are being updated this message may be ignored, if not the following error(s) may be blocking the current package operation: 'MahApps.Metro 2.4.10 constraint: ControlzEx (>= 4.4.0 && < 6.0.0)'
Update-Package : Unable to resolve dependencies. 'ControlzEx 6.0.0' is not compatible with 'MahApps.Metro 2.4.10 constraint: ControlzEx (>= 4.4.0 && < 6.0.0)'.
At line:1 char:1
+ Update-Package -IgnoreDependencies -IncludePrerelease -ToHighestPatch ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Update-Package], Exception
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PackageManagement.PowerShellCmdlets.UpdatePackageCommand
Ntiwari03 commented 6 days ago

This change #4193 was submitted in Oct 2021 with MahApps.Metro/2.4.9 which has dependency constraint. https://www.nuget.org/packages/MahApps.Metro/2.4.9

MahApps.Metro/2.4.10 was released on 7/6/2023

ControlzEx/6.0.0 was released on 5/7/2023 i.e. prior to MahApps.Metro/2.4.10. https://www.nuget.org/packages/ControlzEx/6.0.0

Ideally, this constraint must have been modified in MahApps.Metro/2.4.10. Probably, we need another version of MahApps.Metro/2.4.11 with this fix.

constraint: ControlzEx (>= 4.4.0 && < 6.0.0)' be modified to => ControlzEx (>= 4.4.0 && <= 6.0.0)'

FYI, I get below error on installing 'ControlzEx 6.0.0'. Install-Package : Unable to resolve dependencies. 'ControlzEx 6.0.0' is not compatible with 'MahApps.Metro 2.4.10 constraint: ControlzEx (>= 4.4.0 && < 6.0.0)'.

punker76 commented 6 days ago

@Ntiwari03 ControzlEx v6 is not compatible to MahApps v2.4.x. So if you have ControlzEx v6 installed, then you can only use MahApps v3 pre-alpha.

Ntiwari03 commented 6 days ago

@punker76 Please let me know latest stable compatible versions of ControzlEx and MahApps.

timunie commented 5 days ago

@Ntiwari03

Install-Package : Unable to resolve dependencies. 'ControlzEx 6.0.0' is not compatible with 'MahApps.Metro 2.4.10 constraint: ControlzEx (>= 4.4.0 && < 6.0.0)'.

this message means the version must be bigger than 4.4.0 and must be smaller than 6.0.0. ► So any package with version 5.. should be fine.