protected override ReferenceNode CreateFileComponent(VSCOMPONENTSELECTORDATA selectorData) { if (!File.Exists(selectorData.bstrFile)) { return(null); } WixProjectNode projectNode = this.ProjectMgr as WixProjectNode; WixHelperMethods.ShipAssert(projectNode != null, "ProjectMgr is null or is not WixProjectNode."); switch (Path.GetExtension(selectorData.bstrFile)) { case ".wixlib": return(new WixLibraryReferenceNode(projectNode, projectNode.GetRelativePath(selectorData.bstrFile))); case ".dll": return(new WixExtensionReferenceNode(projectNode, selectorData.bstrFile)); default: string message = String.Format(CultureInfo.CurrentUICulture, WixStrings.WixReferenceInvalid, selectorData.bstrFile); WixHelperMethods.ShowErrorMessageBox(this.ProjectMgr.Site, message); return(null); } }
protected override void BindReferenceData() { WixHelperMethods.ShipAssert(this.ItemNode != null, "The MSBuild ItemNode should have been set by now."); // resolve the references, which will copy the files locally if the Private flag is set this.ProjectMgr.Build(WixProjectFileConstants.MsBuildTarget.ResolveWixLibraryReferences); }