public override bool Execute() { try { return(BuildSigner.SignFiles(new string[] { msi }, stagingDirectory, signInfo, this)); } catch (Exception e) { Log.LogErrorFromException(e); return(false); } }
public override bool Execute() { var debugTasks = Environment.GetEnvironmentVariable("MSBUILD_DEBUG_TASKS"); if (!string.IsNullOrWhiteSpace(debugTasks) && debugTasks.Contains("Microsoft.SPOT.Tasks.Internal.SignMsiAssemblies")) { System.Diagnostics.Debugger.Launch(); } try { Dictionary <string, string> typeDictionary = new Dictionary <string, string>(); foreach (ITaskItem fileType in fileTypes) { if (!typeDictionary.ContainsKey(fileType.ItemSpec)) { typeDictionary.Add(fileType.ItemSpec, null); } } List <string> signableFiles = new List <string>(); foreach (ITaskItem file in files) { if (typeDictionary.ContainsKey(file.GetMetadata("FileType"))) { signableFiles.Add(file.ItemSpec); } } return(BuildSigner.SignFiles(signableFiles.ToArray(), stagingDirectory, signInfo, this)); } catch (Exception e) { Log.LogErrorFromException(e); return(false); } }