Repository: microsoft/PowerToys
File: src/modules/launcher/PowerLauncher/Plugin/PluginManager.cs (C#)

Code before:
        /// <summary>
        /// Gets directories that will hold Wox plugin directory
        /// </summary>
        public static List<PluginPair> AllPlugins
        {
            get
            {
                if (_allPlugins == null)
                {
                    lock (AllPluginsLock)
                    {
                        if (_allPlugins == null)
                        {
                            _allPlugins = PluginConfig.Parse(Directories)
                                .Where(x => x.Language.ToUpperInvariant() == AllowedLanguage.CSharp)
                                .GroupBy(x => x.ID) // Deduplicates plugins by ID, choosing for each ID the highest DLL product version. This fixes issues such as https://github.com/microsoft/PowerToys/issues/14701
                                .Select(g => g.OrderByDescending(x => // , where an upgrade didn't remove older versions of the plugins.
                                {
                                    try
                                    {
                                        // Return a comparable product version.
                                        var fileVersion = FileVersionInfo.GetVersionInfo(x.ExecuteFilePath);
                                        return ((uint)fileVersion.ProductMajorPart << 24)
                                            | ((uint)fileVersion.ProductMinorPart << 16)
                                            | ((uint)fileVersion.ProductBuildPart << 8)
                                            | (uint)fileVersion.ProductPrivatePart;
                                    }
                                    catch (System.IO.FileNotFoundException)
                                    {
                                        // We'll get an error when loading the DLL later on if there's not a decent version of this plugin.
                                        return 0U;
                                    }
                                }).First())
                                .Select(x => new PluginPair(x))
                                .ToList();
                        }
                    }
                }

                return _allPlugins;
            }
        }

        public static IPublicAPI API { get; private set; }

        public static List<PluginPair> GlobalPlugins
        {
            get
            {
                return AllPlugins.Where(x => x.Metadata.IsGlobal).ToList();
            }

Review comment (suggestion):
I think the idea here was to have it be long, most likely. How about doing the cast to `uint` first and then `ulong`?
```
return ((ulong)(uint)fileVersion.ProductMajorPart << 48)
    | ((ulong)(uint)fileVersion.ProductMinorPart << 32)
    | ((ulong)(uint)fileVersion.ProductBuildPart << 16)
    | (ulong)(uint)fileVersion.ProductPrivatePart;
```
perhaps with a comment that we're making it unsigned first and then extending to  64 bits.

Code after:

        /// <summary>
        /// Gets directories that will hold Wox plugin directory
        /// </summary>
        public static List<PluginPair> AllPlugins
        {
            get
            {
                if (_allPlugins == null)
                {
                    lock (AllPluginsLock)
                    {
                        if (_allPlugins == null)
                        {
                            _allPlugins = PluginConfig.Parse(Directories)
                                .Where(x => x.Language.ToUpperInvariant() == AllowedLanguage.CSharp)
                                .GroupBy(x => x.ID) // Deduplicates plugins by ID, choosing for each ID the highest DLL product version. This fixes issues such as https://github.com/microsoft/PowerToys/issues/14701
                                .Select(g => g.OrderByDescending(x => // , where an upgrade didn't remove older versions of the plugins.
                                {
                                    try
                                    {
                                        // Return a comparable product version.
                                        var fileVersion = FileVersionInfo.GetVersionInfo(x.ExecuteFilePath);

                                        // Convert each part to an unsigned 32 bit integer, then extend to 64 bit.
                                        return ((ulong)(uint)fileVersion.ProductMajorPart << 48)
                                            | ((ulong)(uint)fileVersion.ProductMinorPart << 32)
                                            | ((ulong)(uint)fileVersion.ProductBuildPart << 16)
                                            | (ulong)(uint)fileVersion.ProductPrivatePart;
                                    }
                                    catch (System.IO.FileNotFoundException)
                                    {
                                        // We'll get an error when loading the DLL later on if there's not a decent version of this plugin.
                                        return 0U;
                                    }
                                }).First())
                                .Select(x => new PluginPair(x))
                                .ToList();
                        }
                    }
                }

                return _allPlugins;
            }
        }

        public static IPublicAPI API { get; private set; }

        public static List<PluginPair> GlobalPlugins
        {
            get