/// <summary>
        /// Execute the task.
        /// </summary>
        /// <param name="Job">Information about the current job</param>
        /// <param name="BuildProducts">Set of build products produced by this node.</param>
        /// <param name="TagNameToFileSet">Mapping from tag names to the set of files they include</param>
        public override void Execute(JobContext Job, HashSet <FileReference> BuildProducts, Dictionary <string, HashSet <FileReference> > TagNameToFileSet)
        {
            // Set the Engine directory
            DirectoryReference EngineDir = Parameters.EngineDir ?? CommandUtils.EngineDirectory;

            // Resolve the input list
            IEnumerable <FileReference> TargetFiles = ResolveFilespec(CommandUtils.RootDirectory, Parameters.Files, TagNameToFileSet);

            foreach (FileReference TargetFile in TargetFiles)
            {
                // check all files are .target files
                if (TargetFile.GetExtension() != ".target")
                {
                    throw new AutomationException("Invalid file passed to TagReceipt task ({0})", TargetFile.FullName);
                }

                // Print the name of the file being scanned
                Log.TraceInformation("Sanitizing {0}", TargetFile);
                using (new LogIndentScope("  "))
                {
                    // Read the receipt
                    TargetReceipt Receipt;
                    if (!TargetReceipt.TryRead(TargetFile, EngineDir, out Receipt))
                    {
                        CommandUtils.LogWarning("Unable to load file using TagReceipt task ({0})", TargetFile.FullName);
                        continue;
                    }

                    // Remove any build products that don't exist
                    List <BuildProduct> NewBuildProducts = new List <BuildProduct>(Receipt.BuildProducts.Count);
                    foreach (BuildProduct BuildProduct in Receipt.BuildProducts)
                    {
                        if (FileReference.Exists(BuildProduct.Path))
                        {
                            NewBuildProducts.Add(BuildProduct);
                        }
                        else
                        {
                            Log.TraceInformation("Removing build product: {0}", BuildProduct.Path);
                        }
                    }
                    Receipt.BuildProducts = NewBuildProducts;

                    // Remove any runtime dependencies that don't exist
                    RuntimeDependencyList NewRuntimeDependencies = new RuntimeDependencyList();
                    foreach (RuntimeDependency RuntimeDependency in Receipt.RuntimeDependencies)
                    {
                        if (FileReference.Exists(RuntimeDependency.Path))
                        {
                            NewRuntimeDependencies.Add(RuntimeDependency);
                        }
                        else
                        {
                            Log.TraceInformation("Removing runtime dependency: {0}", RuntimeDependency.Path);
                        }
                    }
                    Receipt.RuntimeDependencies = NewRuntimeDependencies;

                    // Save the new receipt
                    Receipt.Write(TargetFile, EngineDir);
                }
            }
        }
		public UEBuildModule(
			string InName,
			UHTModuleType InType,
			DirectoryReference InModuleDirectory,
			ModuleRules InRules,
			FileReference InRulesFile
			)
		{
			Name = InName;
			Type = InType;
			ModuleDirectory = InModuleDirectory;
			Rules = InRules;
			RulesFile = InRulesFile;

			NormalizedModuleIncludePath = Utils.CleanDirectorySeparators(ModuleDirectory.MakeRelativeTo(UnrealBuildTool.EngineSourceDirectory), '/');
			ModuleApiDefine = Name.ToUpperInvariant() + "_API";

			PublicDefinitions = HashSetFromOptionalEnumerableStringParameter(InRules.Definitions);
			PublicIncludePaths = HashSetFromOptionalEnumerableStringParameter(InRules.PublicIncludePaths);
			PublicSystemIncludePaths = HashSetFromOptionalEnumerableStringParameter(InRules.PublicSystemIncludePaths);
			PublicLibraryPaths = HashSetFromOptionalEnumerableStringParameter(InRules.PublicLibraryPaths);
			PublicAdditionalLibraries = HashSetFromOptionalEnumerableStringParameter(InRules.PublicAdditionalLibraries);
			PublicFrameworks = HashSetFromOptionalEnumerableStringParameter(InRules.PublicFrameworks);
			PublicWeakFrameworks = HashSetFromOptionalEnumerableStringParameter(InRules.PublicWeakFrameworks);
			PublicAdditionalFrameworks = InRules.PublicAdditionalFrameworks == null ? new HashSet<UEBuildFramework>() : new HashSet<UEBuildFramework>(InRules.PublicAdditionalFrameworks);
			PublicAdditionalShadowFiles = HashSetFromOptionalEnumerableStringParameter(InRules.PublicAdditionalShadowFiles);
			PublicAdditionalBundleResources = InRules.AdditionalBundleResources == null ? new HashSet<UEBuildBundleResource>() : new HashSet<UEBuildBundleResource>(InRules.AdditionalBundleResources);
			PublicDelayLoadDLLs = HashSetFromOptionalEnumerableStringParameter(InRules.PublicDelayLoadDLLs);
			PrivateIncludePaths = HashSetFromOptionalEnumerableStringParameter(InRules.PrivateIncludePaths);
			RuntimeDependencies = (InRules.RuntimeDependencies == null) ? new RuntimeDependencyList() : new RuntimeDependencyList(InRules.RuntimeDependencies);
			IsRedistributableOverride = InRules.IsRedistributableOverride;
		}