Description
Around 6 months ago, I have installed Microsoft.Graph
version 1.0.1
on my machine. That was the latest version at the time.
I then proceeded to write some scripts using this module.
Recently, a colleague of mine wanted to run these scripts from their machine.
Initially, they would run Install-Module -Name Microsoft.Graph
to install the latest version (1.4.2
), and then proceed to run the script.
It turned out there had been some breaking changes in the later version, and the script could not be run with this version.
They would then proceed to uninstall all installed Graph modules, and attempt to install version 1.0.1
using the following command:
Install-Module -Name Microsoft.Graph -RequiredVersion 1.0.1
This would also not do the trick, since all dependencies are written like this:
Microsoft.Graph.<Dependency> (>= 1.0.1)
and so, it'd just proceed to install version 1.4.2
of all the dependencies anyways.
I think it would be preferable that when one asks for a certain version, say 1.0.1
, you actually get the modules of that version. Perhaps it would be better to declare the dependencies with their dependencies "strictly equals", instead of "greater than or equals", like so:
Microsoft.Graph.<Dependency> (= 1.0.1)
As it is currently set up, it seems to me that the versioning of Microsoft.Graph
has lost all meaning. It will not matter if I ask for version 1.0.1
, 1.2.0
or 1.3.1
for example, as it will just go grab version 1.4.2
of all the dependencies anyways.
For now, it seems the workaround for us is to explicitly install the dependencies we need, with that specific version. This is certainly not optimal, and seems to defeat the purpose of the Microsoft.Graph
module. 😞
AB#8695