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
Create a DSC configuration that imports a specific module version which happens to not be the newest one (at the time of writing the newest one for the module imported is 8.4.0.0):
It fails with Parse error in file ...: Cound not find the module '<xPSDesiredStateConfiguration, 8.3.0.0>'... error.
Expected behavior
PSScriptAnalyzer should use the specified version of the module.
Actual behavior
PSScriptAnalyzer appears to only retrieve the newest version of the module. As soon as there's a newer version than specified available, the invocation breaks.
Environment data
This is with PSScriptAnalyzer version 1.17.1.
After looking at the implementation, I'm pretty sure that the module specification syntax doesn't work either: –ModuleName @{ModuleName="xPSDesiredStateConfiguration";ModuleVersion="8.3.0.0"}.
The text was updated successfully, but these errors were encountered:
I can confirm this happens and will look into it, using the -Verbose switch, I see that PSSA downloads the latest version at the moment. The code in ModuleDependencyHandlere.cs shows that downloading a specific version is a feature that is not implemented yet. We would definitely accept a PR for that.
Steps to reproduce
Create a DSC configuration that imports a specific module version which happens to not be the newest one (at the time of writing the newest one for the module imported is 8.4.0.0):
Invoke PSScriptAnalyzer with SaveDscDependency switch:
It fails with
Parse error in file ...: Cound not find the module '<xPSDesiredStateConfiguration, 8.3.0.0>'...
error.Expected behavior
PSScriptAnalyzer should use the specified version of the module.
Actual behavior
PSScriptAnalyzer appears to only retrieve the newest version of the module. As soon as there's a newer version than specified available, the invocation breaks.
Environment data
This is with PSScriptAnalyzer version 1.17.1.
After looking at the implementation, I'm pretty sure that the module specification syntax doesn't work either:
–ModuleName @{ModuleName="xPSDesiredStateConfiguration";ModuleVersion="8.3.0.0"}
.The text was updated successfully, but these errors were encountered: