Skip to content

Incorrect Sitecore version in $PSVersionTable #1398

@alan-null

Description

@alan-null

Currently, the logic allows specifying the version via the Spe.Core.VersionDecoupling setting, which controls which version-specific DLL will be used.

var supportedConfigVersion = Sitecore.Configuration.Settings.GetSetting("Spe.SupportedVersion");

This was helpful for XMC, where the version is 1.6.X. The following logic

var resourceName = CurrentVersion.IsAtLeast(SitecoreVersion.V92) ?
$"{assemblyNamespace}.Resources.Version92." + assemblyName + ".dll" :
$"{assemblyNamespace}.Resources.Version8." + assemblyName + ".dll";

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

if (Version.TryParse(About.Version, out var version))

to prevent it from showing incorrect Sitecore version here

Image

Additional info:
ref: SXA-8781

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions