Closed johlju closed 1 year ago
I labelled this a breaking change, but don't think we should bump major version for this change. It is more of a bug, and will only affect users that actually started using the property, and that will fail as soon as their configuration will use another resource from another module that also uses Reasons
.
There should be no need to remove the property Reasons
. See more information in issue https://github.com/dsccommunity/DscResource.Base/issues/4.
Problem description
If two resources, each for an indvidual module, both have the property
Reasons
a configuration that uses those two resources fail to parse. This is because the code[DscProperty()] [Reasons[]] $Reasons
fails to parse when it finds the same class name loaded in two modules.@nyanhp found and reproduce this. @nyanhp created a repository that shows the issue with both class-based resources and MOF-based resources: https://github.com/nyanhp/DscRepro
Verbose logs
DSC configuration
Suggested solution
There is no fix for this as it is a external problem with PowerShell DSC. We must remove the property
Reasons
from the resource.SQL Server edition and version
SQL Server PowerShell modules
Operating system
PowerShell version
SqlServerDsc version