DSC PackageManagement Resource: Support for multiple versions of a module
jwittner opened this issue · 3 comments
It's often the case that multiple versions of a module need to be present on a machine. Unfortunately this case isn't supported (far as I can tell) by the PackageManagement DSC resource because the resource key is used as the package name and so you get conflicts if you attempt to list multiple resources to get different versions installed side by side:
A conflict was detected between resources '[PackageManagement]UnityTest (::94::9::PackageManagement)' and '[PackageManagement]UnityTest2 (::103::9::PackageManagement)' in node 'Agent'. Resources have identical key properties but there are differences in the following non-key properties: 'RequiredVersion'. Values '1.0.8126' don't match values '2.0.12499'. Please update these property values so that they are identical in both cases.
Thinking on remedies - perhaps I could modify this resource in a backwards compatible way to accept a list of versions in the RequiredVersion property and it would apply the action for all versions listed?
@jwittner thanks for opening this issue, and for starting to think of ways to solve it...we are actually currently in the process of moving away from using PackageManagement by re-writing PowerShellGet without this dependency...as a result we are currently only accepting security fixes to PackageManagement... many of our DSC rescources are community driven efforts so if we have the community support we may be able to port these resources...thanks again!
Thanks for the info @SydneyhSmith! Is there a roadmap for this rewrite? What DSC resources will be provided for the new PowerShellGet implementation?
@jwittner this is where we are trackign the plan for PowerShellGet 3.0:
https://github.com/PowerShell/PowerShell-RFC/pull/185/files
Thanks!