/// <summary>
        ///     Removes target package.
        /// </summary>
        /// <exception cref="ArgumentNullException"/>
        public static void RemovePackage([NotNull] JEMAssetBuilderPackage package)
        {
            if (package == null)
            {
                throw new ArgumentNullException(nameof(package));
            }
            if (!Packages.Contains(package))
            {
                return;
            }

            var configurationFile = package.GetConfigurationFile();

            if (File.Exists(configurationFile))
            {
                File.Delete(configurationFile);
            }

            Packages.Remove(package);
        }