Console icon indicating copy to clipboard operation
Console copied to clipboard

Incorrect Sitecore version in $PSVersionTable

Open alan-null opened this issue 1 month ago • 0 comments

Currently, the logic allows specifying the version via the Spe.Core.VersionDecoupling setting, which controls which version-specific DLL will be used. https://github.com/SitecorePowerShell/Console/blob/727ee937bea39117104ebfc122cecabae15cd323/src/Spe/Core/VersionDecoupling/SitecoreVersion.cs#L19

This was helpful for XMC, where the version is 1.6.X. The following logic https://github.com/SitecorePowerShell/Console/blob/727ee937bea39117104ebfc122cecabae15cd323/src/Spe/Integrations/Pipelines/AssemblyResolver.cs#L36-L38

resolves versions prior to 9.2 (Version8). As a workaround, XMC specifies version 10.3

I believe at least $PSVersionTable could be improved and should use About.Version, similar to the https://github.com/SitecorePowerShell/Console/blob/727ee937bea39117104ebfc122cecabae15cd323/src/Spe/Core/VersionDecoupling/SitecoreVersion.cs#L25

to prevent it from showing incorrect Sitecore version here

Image

Additional info: ref: SXA-8781

alan-null avatar Nov 28 '25 09:11 alan-null