public void Load()
        {
            _commands = new Dictionary <string, NuGet.PackageInfo>();

            var pathFilter = RuntimeEnvironmentHelper.IsWindows ? "*.cmd" : "*.*";

            var allCommandFiles = _commandsFolder
                                  .GetFiles(".", pathFilter, recursive: false)
                                  .Select(relativePath => _commandsFolder.GetFullPath(relativePath));

            foreach (string commandFile in allCommandFiles)
            {
                var lines = File.ReadAllLines(commandFile);

                if (lines.Length != 1)
                {
                    // The run scripts are just one line so this is not an installed app script
                    continue;
                }

                var pathParts = lines[0].Split(new char[] { Path.DirectorySeparatorChar }, StringSplitOptions.RemoveEmptyEntries);

                // ~dp0\packages\<packageId>\<packageVersion>\app\<commandName>[.cmd]
                if (pathParts.Length != 6)
                {
                    continue;
                }

                var             packageId = pathParts[2];
                SemanticVersion packageVersion;
                if (!SemanticVersion.TryParse(pathParts[3], out packageVersion))
                {
                    continue;
                }

                // version dir = {packagesFolderName}\{packageId}\{version}
                var versionDir = Path.Combine(
                    PackagesRoot.Root,
                    packageId,
                    packageVersion.ToString());

                var appPackage = new NuGet.PackageInfo(
                    PackagesRoot,
                    packageId,
                    packageVersion,
                    versionDir);

                _commands.Add(
                    Path.GetFileNameWithoutExtension(commandFile),
                    appPackage);
            }
        }