public void Create(XmlNode fNode)
        {
            XmlNode nd = DirNode.OwnerDocument.CreateElement("Shortcut", WixUtil.uri);

            fNode.AppendChild(nd);
            XmlUtil.SetAttribute(nd, "Id", WixUtil.formFileId(_filename));
            XmlUtil.SetAttribute(nd, "Advertise", "yes");
            WixUtil.passAttribute(nd, _node, "Directory");
            WixUtil.passAttribute(nd, _node, "Name");
            WixUtil.passAttribute(nd, _node, "WorkingDirectory");
            WixUtil.passAttribute(nd, _node, "Icon");
            //
        }
 public void Create(StringBuilder errorReport)
 {
     foreach (KeyValuePair <string, List <ShortCut> > kv in this)
     {
         if (kv.Value.Count > 0)
         {
             if (kv.Value[0].Used)
             {
                 XmlNode dirNode     = kv.Value[0].DirNode;
                 XmlNode featureNode = kv.Value[0].FeatureNode;
                 XmlNode cNode       = dirNode.OwnerDocument.CreateElement("Component", WixUtil.uri);
                 dirNode.AppendChild(cNode);
                 string cid = WixUtil.GetNewId();
                 XmlUtil.SetAttribute(cNode, "Id", cid);
                 XmlUtil.SetAttribute(cNode, "Guid", Guid.NewGuid().ToString("D", CultureInfo.InvariantCulture));
                 XmlNode fNode = dirNode.OwnerDocument.CreateElement("File", WixUtil.uri);
                 string  fid   = WixUtil.formFileId(kv.Key);
                 XmlUtil.SetAttribute(fNode, "Id", fid);
                 XmlUtil.SetAttribute(fNode, "Name", Path.GetFileName(kv.Value[0].File));
                 XmlUtil.SetAttribute(fNode, "DiskId", "1");
                 XmlUtil.SetAttribute(fNode, "Source", kv.Value[0].File);
                 XmlUtil.SetAttribute(fNode, "KeyPath", "yes");
                 cNode.AppendChild(fNode);
                 //
                 XmlNode crf = dirNode.OwnerDocument.CreateElement("ComponentRef", WixUtil.uri);
                 XmlUtil.SetAttribute(crf, "Id", cid);
                 featureNode.AppendChild(crf);
                 //
                 foreach (ShortCut s in kv.Value)
                 {
                     s.Create(fNode);
                 }
             }
             else
             {
                 errorReport.Append("Shortcut target not found:");
                 errorReport.Append(kv.Key);
                 errorReport.Append("\r\n");
             }
         }
     }
 }